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_copyable.hpp 10 * 11 * This header defines \c is_trivially_copyable type trait 12 */ 13 14 #ifndef BOOST_ATOMIC_DETAIL_TYPE_TRAITS_IS_TRIVIALLY_COPYABLE_HPP_INCLUDED_ 15 #define BOOST_ATOMIC_DETAIL_TYPE_TRAITS_IS_TRIVIALLY_COPYABLE_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 // For std::is_trivially_copyable we require a genuine support from the compiler. 22 // Fallback to is_pod or a false negative result in Boost.TypeTraits is not acceptable 23 // as this trait will be used in a static assert and may deny valid uses of boost::atomic/atomic_ref. 24 #define BOOST_ATOMIC_DETAIL_NO_CXX11_IS_TRIVIALLY_COPYABLE 25 #endif 26 27 #ifdef BOOST_HAS_PRAGMA_ONCE 28 #pragma once 29 #endif 30 31 #if !defined(BOOST_ATOMIC_DETAIL_NO_CXX11_IS_TRIVIALLY_COPYABLE) 32 33 namespace boost { 34 namespace atomics { 35 namespace detail { 36 37 using std::is_trivially_copyable; 38 39 } // namespace detail 40 } // namespace atomics 41 } // namespace boost 42 43 #endif // !defined(BOOST_ATOMIC_DETAIL_NO_CXX11_IS_TRIVIALLY_COPYABLE) 44 45 #endif // BOOST_ATOMIC_DETAIL_TYPE_TRAITS_IS_TRIVIALLY_COPYABLE_HPP_INCLUDED_ 46