is_trivially_default_constructible.hpp 1.3 KB

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) 2018 Andrey Semashev
  7. */
  8. /*!
  9. * \file atomic/detail/type_traits/is_trivially_default_constructible.hpp
  10. *
  11. * This header defines \c is_trivially_default_constructible type trait
  12. */
  13. #ifndef BOOST_ATOMIC_DETAIL_TYPE_TRAITS_IS_TRIVIALLY_DEFAULT_CONSTRUCTIBLE_HPP_INCLUDED_
  14. #define BOOST_ATOMIC_DETAIL_TYPE_TRAITS_IS_TRIVIALLY_DEFAULT_CONSTRUCTIBLE_HPP_INCLUDED_
  15. #include <boost/atomic/detail/config.hpp>
  16. #if !defined(BOOST_NO_CXX11_HDR_TYPE_TRAITS)
  17. #include <type_traits>
  18. #else
  19. #include <boost/type_traits/has_trivial_constructor.hpp>
  20. #endif
  21. #ifdef BOOST_HAS_PRAGMA_ONCE
  22. #pragma once
  23. #endif
  24. namespace boost {
  25. namespace atomics {
  26. namespace detail {
  27. #if !defined(BOOST_NO_CXX11_HDR_TYPE_TRAITS)
  28. using std::is_trivially_default_constructible;
  29. #elif !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES)
  30. template< typename T >
  31. using is_trivially_default_constructible = boost::has_trivial_constructor< T >;
  32. #else
  33. template< typename T >
  34. struct is_trivially_default_constructible : public boost::has_trivial_constructor< T > {};
  35. #endif
  36. } // namespace detail
  37. } // namespace atomics
  38. } // namespace boost
  39. #endif // BOOST_ATOMIC_DETAIL_TYPE_TRAITS_IS_TRIVIALLY_DEFAULT_CONSTRUCTIBLE_HPP_INCLUDED_