intptr.hpp 992 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. /*
  2. * Distributed under the Boost Software License, Version 1.0.
  3. * (See accompanying file LICENSE_1_0.txt or copy at
  4. * http://www.boost.org/LICENSE_1_0.txt)
  5. *
  6. * Copyright (c) 2020 Andrey Semashev
  7. */
  8. /*!
  9. * \file atomic/detail/intptr.hpp
  10. *
  11. * This header defines (u)intptr_t types.
  12. */
  13. #ifndef BOOST_ATOMIC_DETAIL_INTPTR_HPP_INCLUDED_
  14. #define BOOST_ATOMIC_DETAIL_INTPTR_HPP_INCLUDED_
  15. #include <boost/cstdint.hpp>
  16. #if defined(BOOST_HAS_INTPTR_T)
  17. #include <cstddef>
  18. #endif
  19. #include <boost/atomic/detail/config.hpp>
  20. #include <boost/atomic/detail/header.hpp>
  21. #ifdef BOOST_HAS_PRAGMA_ONCE
  22. #pragma once
  23. #endif
  24. namespace boost {
  25. namespace atomics {
  26. namespace detail {
  27. #if !defined(BOOST_HAS_INTPTR_T)
  28. using boost::uintptr_t;
  29. using boost::intptr_t;
  30. #else
  31. typedef std::size_t uintptr_t;
  32. typedef std::ptrdiff_t intptr_t;
  33. #endif
  34. } // namespace detail
  35. } // namespace atomics
  36. } // namespace boost
  37. #include <boost/atomic/detail/footer.hpp>
  38. #endif // BOOST_ATOMIC_DETAIL_INTPTR_HPP_INCLUDED_