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 
14 #ifndef BOOST_ATOMIC_DETAIL_INTPTR_HPP_INCLUDED_
15 #define BOOST_ATOMIC_DETAIL_INTPTR_HPP_INCLUDED_
16 
17 #include <boost/cstdint.hpp>
18 #if defined(BOOST_HAS_INTPTR_T)
19 #include <cstddef>
20 #endif
21 #include <boost/atomic/detail/config.hpp>
22 #include <boost/atomic/detail/header.hpp>
23 
24 #ifdef BOOST_HAS_PRAGMA_ONCE
25 #pragma once
26 #endif
27 
28 namespace boost {
29 namespace atomics {
30 namespace detail {
31 
32 #if !defined(BOOST_HAS_INTPTR_T)
33 using boost::uintptr_t;
34 using boost::intptr_t;
35 #else
36 typedef std::size_t uintptr_t;
37 typedef std::ptrdiff_t intptr_t;
38 #endif
39 
40 } // namespace detail
41 } // namespace atomics
42 } // namespace boost
43 
44 #include <boost/atomic/detail/footer.hpp>
45 
46 #endif // BOOST_ATOMIC_DETAIL_INTPTR_HPP_INCLUDED_
47