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 
14 #ifndef BOOST_ATOMIC_DETAIL_TYPE_TRAITS_IS_TRIVIALLY_DEFAULT_CONSTRUCTIBLE_HPP_INCLUDED_
15 #define BOOST_ATOMIC_DETAIL_TYPE_TRAITS_IS_TRIVIALLY_DEFAULT_CONSTRUCTIBLE_HPP_INCLUDED_
16 
17 #include <boost/atomic/detail/config.hpp>
18 #if !defined(BOOST_NO_CXX11_HDR_TYPE_TRAITS)
19 #include <type_traits>
20 #else
21 #include <boost/type_traits/has_trivial_constructor.hpp>
22 #endif
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_NO_CXX11_HDR_TYPE_TRAITS)
33 using std::is_trivially_default_constructible;
34 #elif !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES)
35 template< typename T >
36 using is_trivially_default_constructible = boost::has_trivial_constructor< T >;
37 #else
38 template< typename T >
39 struct is_trivially_default_constructible : public boost::has_trivial_constructor< T > {};
40 #endif
41 
42 } // namespace detail
43 } // namespace atomics
44 } // namespace boost
45 
46 #endif // BOOST_ATOMIC_DETAIL_TYPE_TRAITS_IS_TRIVIALLY_DEFAULT_CONSTRUCTIBLE_HPP_INCLUDED_
47