file.hpp 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. //
  2. // Copyright (c) 2015-2016 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. #include <boost/config.hpp>
  17. namespace boost {
  18. namespace beast {
  19. /** An implementation of File.
  20. This alias is set to the best available implementation
  21. of @b File given the platform and build settings.
  22. */
  23. #if BOOST_BEAST_DOXYGEN
  24. struct file : file_stdio
  25. {
  26. };
  27. #else
  28. #if BOOST_BEAST_USE_WIN32_FILE
  29. using file = file_win32;
  30. #elif BOOST_BEAST_USE_POSIX_FILE
  31. using file = file_posix;
  32. #else
  33. using file = file_stdio;
  34. #endif
  35. #endif
  36. } // beast
  37. } // boost
  38. #endif