file.hpp 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. //
  2. // Copyright (c) 2015-2019 Vinnie Falco (vinnie dot falco at gmail dot com)
  3. //
  4. // Distributed under the Boost Software License, Version 1.0. (See accompanying
  5. // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  6. //
  7. // Official repository: https://github.com/boostorg/beast
  8. //
  9. #ifndef BOOST_BEAST_CORE_FILE_HPP
  10. #define BOOST_BEAST_CORE_FILE_HPP
  11. #include <boost/beast/core/detail/config.hpp>
  12. #include <boost/beast/core/file_base.hpp>
  13. #include <boost/beast/core/file_posix.hpp>
  14. #include <boost/beast/core/file_stdio.hpp>
  15. #include <boost/beast/core/file_win32.hpp>
  16. namespace boost {
  17. namespace beast {
  18. /** An implementation of File.
  19. This alias is set to the best available implementation
  20. of <em>File</em> given the platform and build settings.
  21. */
  22. #if BOOST_BEAST_DOXYGEN
  23. struct file : file_stdio
  24. {
  25. };
  26. #else
  27. #if BOOST_BEAST_USE_WIN32_FILE
  28. using file = file_win32;
  29. #elif BOOST_BEAST_USE_POSIX_FILE
  30. using file = file_posix;
  31. #else
  32. using file = file_stdio;
  33. #endif
  34. #endif
  35. } // beast
  36. } // boost
  37. #endif