sp_nullptr_t.hpp 976 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. #ifndef BOOST_SMART_PTR_DETAIL_SP_NULLPTR_T_HPP_INCLUDED
  2. #define BOOST_SMART_PTR_DETAIL_SP_NULLPTR_T_HPP_INCLUDED
  3. // MS compatible compilers support #pragma once
  4. #if defined(_MSC_VER) && (_MSC_VER >= 1020)
  5. # pragma once
  6. #endif
  7. // detail/sp_nullptr_t.hpp
  8. //
  9. // Copyright 2013 Peter Dimov
  10. //
  11. // Distributed under the Boost Software License, Version 1.0.
  12. // See accompanying file LICENSE_1_0.txt or copy at
  13. // http://www.boost.org/LICENSE_1_0.txt
  14. #include <boost/config.hpp>
  15. #include <cstddef>
  16. #if !defined( BOOST_NO_CXX11_NULLPTR )
  17. namespace boost
  18. {
  19. namespace detail
  20. {
  21. #if !defined( BOOST_NO_CXX11_DECLTYPE ) && ( ( defined( __clang__ ) && !defined( _LIBCPP_VERSION ) ) || defined( __INTEL_COMPILER ) )
  22. typedef decltype(nullptr) sp_nullptr_t;
  23. #else
  24. typedef std::nullptr_t sp_nullptr_t;
  25. #endif
  26. } // namespace detail
  27. } // namespace boost
  28. #endif // !defined( BOOST_NO_CXX11_NULLPTR )
  29. #endif // #ifndef BOOST_SMART_PTR_DETAIL_SP_NULLPTR_T_HPP_INCLUDED