diff --git a/include/boost/optional/optional.hpp b/include/boost/optional/optional.hpp index 4a237a1..b955fb7 100644 --- a/include/boost/optional/optional.hpp +++ b/include/boost/optional/optional.hpp @@ -827,13 +827,21 @@ struct is_type_trivially_copyable } // namespace optional_detail namespace optional_config { - + +#ifndef BOOST_OPTIONAL_DETAIL_NO_SPEC_FOR_TRIVIAL_TYPES template struct is_type_trivial : boost::conditional< (optional_detail::is_type_trivially_copyable::value && BOOST_HAS_TRIVIAL_CONSTRUCTOR(T)) || (boost::is_scalar::value && !boost::is_const::value && !boost::is_volatile::value) , boost::true_type, boost::false_type>::type {}; +#else +template +struct is_type_trivial + : boost::conditional<(boost::is_scalar::value && !boost::is_const::value && !boost::is_volatile::value) + , boost::true_type, boost::false_type>::type +{}; +#endif } // namespace optional_config