Reverted specialization for trivial types

It caused too many problems. I left only specialiation for scalar types.
I will need to devise clever type traits for reconizing trivial types with working constructor.
This commit is contained in:
Andrzej Krzemienski
2017-11-04 17:42:22 +01:00
parent cbf3cd05af
commit 06dea2cb9b
11 changed files with 293 additions and 123 deletions

View File

@@ -15,7 +15,6 @@
#include <boost/config.hpp>
#include <boost/detail/workaround.hpp>
#include <boost/type_traits/intrinsics.hpp>
#if (defined BOOST_NO_CXX11_RVALUE_REFERENCES) || (defined BOOST_OPTIONAL_CONFIG_NO_RVALUE_REFERENCES)
# define BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
@@ -126,38 +125,8 @@
#endif
// The condition to use POD implementation
#ifdef BOOST_OPTIONAL_CONFIG_NO_POD_SPEC
# define BOOST_OPTIONAL_DETAIL_NO_SPEC_FOR_TRIVIAL_TYPES
#elif defined BOOST_OPTIONAL_CONFIG_NO_SPEC_FOR_TRIVIAL_TYPES
# define BOOST_OPTIONAL_DETAIL_NO_SPEC_FOR_TRIVIAL_TYPES
#elif !defined BOOST_HAS_TRIVIAL_CONSTRUCTOR
# define BOOST_OPTIONAL_DETAIL_NO_SPEC_FOR_TRIVIAL_TYPES
#elif !defined BOOST_HAS_TRIVIAL_MOVE_ASSIGN
# define BOOST_OPTIONAL_DETAIL_NO_SPEC_FOR_TRIVIAL_TYPES
#elif !defined BOOST_HAS_TRIVIAL_MOVE_CONSTRUCTOR
# define BOOST_OPTIONAL_DETAIL_NO_SPEC_FOR_TRIVIAL_TYPES
#elif !defined BOOST_HAS_TRIVIAL_COPY
# define BOOST_OPTIONAL_DETAIL_NO_SPEC_FOR_TRIVIAL_TYPES
#elif !defined BOOST_HAS_TRIVIAL_ASSIGN
# define BOOST_OPTIONAL_DETAIL_NO_SPEC_FOR_TRIVIAL_TYPES
#elif !defined BOOST_HAS_TRIVIAL_DESTRUCTOR
# define BOOST_OPTIONAL_DETAIL_NO_SPEC_FOR_TRIVIAL_TYPES
#elif BOOST_WORKAROUND(BOOST_GCC, < 50000)
# define BOOST_OPTIONAL_DETAIL_NO_SPEC_FOR_TRIVIAL_TYPES
#endif
#if __cplusplus >= 201103L
# if BOOST_WORKAROUND(BOOST_GCC, >= 50000)
# define BOOST_OPTIONAL_DETAIL_USE_STD_TYPE_TRAITS
# elif (defined BOOST_CLANG)
# define BOOST_OPTIONAL_DETAIL_USE_STD_TYPE_TRAITS
# endif
#endif
#ifdef BOOST_OPTIONAL_CONFIG_NO_POD_SPEC
# define BOOST_OPTIONAL_DETAIL_NO_POD_SPEC
#ifdef BOOST_OPTIONAL_CONFIG_NO_DIRECT_STORAE_SPEC
# define BOOST_OPTIONAL_DETAIL_NO_DIRECT_STORAE_SPEC
#endif