cstdint.hpp 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. //
  2. // detail/cstdint.hpp
  3. // ~~~~~~~~~~~~~~~~~~
  4. //
  5. // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
  6. //
  7. // Distributed under the Boost Software License, Version 1.0. (See accompanying
  8. // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  9. //
  10. #ifndef ASIO_DETAIL_CSTDINT_HPP
  11. #define ASIO_DETAIL_CSTDINT_HPP
  12. #if defined(_MSC_VER) && (_MSC_VER >= 1200)
  13. # pragma once
  14. #endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
  15. #include "asio/detail/config.hpp"
  16. #if defined(ASIO_HAS_CSTDINT)
  17. # include <cstdint>
  18. #else // defined(ASIO_HAS_CSTDINT)
  19. # include <boost/cstdint.hpp>
  20. #endif // defined(ASIO_HAS_CSTDINT)
  21. namespace asio {
  22. #if defined(ASIO_HAS_CSTDINT)
  23. using std::int16_t;
  24. using std::uint16_t;
  25. using std::int32_t;
  26. using std::uint32_t;
  27. using std::int64_t;
  28. using std::uint64_t;
  29. #else // defined(ASIO_HAS_CSTDINT)
  30. using boost::int16_t;
  31. using boost::uint16_t;
  32. using boost::int32_t;
  33. using boost::uint32_t;
  34. using boost::int64_t;
  35. using boost::uint64_t;
  36. #endif // defined(ASIO_HAS_CSTDINT)
  37. } // namespace asio
  38. #endif // ASIO_DETAIL_CSTDINT_HPP