![]() |
|
|||
File indexing completed on 2025-02-24 10:10:19
0001 #ifndef BOOST_SERIALIZATION_DETAIL_IS_DEFAULT_CONSTRUCTIBLE_HPP 0002 #define BOOST_SERIALIZATION_DETAIL_IS_DEFAULT_CONSTRUCTIBLE_HPP 0003 0004 // MS compatible compilers support #pragma once 0005 #if defined(_MSC_VER) 0006 # pragma once 0007 #endif 0008 0009 /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 0010 // is_default_constructible.hpp: serialization for loading stl collections 0011 // 0012 // (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . 0013 // Use, modification and distribution is subject to the Boost Software 0014 // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 0015 // http://www.boost.org/LICENSE_1_0.txt) 0016 0017 // See http://www.boost.org for updates, documentation, and revision history. 0018 0019 #include <boost/config.hpp> 0020 0021 #if ! defined(BOOST_NO_CXX11_HDR_TYPE_TRAITS) 0022 #include <type_traits> 0023 namespace boost{ 0024 namespace serialization { 0025 namespace detail { 0026 0027 template<typename T> 0028 struct is_default_constructible : public std::is_default_constructible<T> {}; 0029 0030 } // detail 0031 } // serialization 0032 } // boost 0033 #else 0034 // we don't have standard library support for is_default_constructible 0035 // so we fake it by using boost::has_trivial_construtor. But this is not 0036 // actually correct because it's possible that a default constructor 0037 // to be non trivial. So when using this, make sure you're not using your 0038 // own definition of of T() but are using the actual default one! 0039 #include <boost/type_traits/has_trivial_constructor.hpp> 0040 namespace boost{ 0041 namespace serialization { 0042 namespace detail { 0043 0044 template<typename T> 0045 struct is_default_constructible : public boost::has_trivial_constructor<T> {}; 0046 0047 } // detail 0048 } // serialization 0049 } // boost 0050 0051 #endif 0052 0053 0054 #endif // BOOST_SERIALIZATION_DETAIL_IS_DEFAULT_CONSTRUCTIBLE_HPP
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
![]() ![]() |