diff --git a/include/boost/optional/detail/experimental_traits.hpp b/include/boost/optional/detail/experimental_traits.hpp index 6eded58..4ac8bc6 100644 --- a/include/boost/optional/detail/experimental_traits.hpp +++ b/include/boost/optional/detail/experimental_traits.hpp @@ -15,8 +15,6 @@ #include #include #include - -namespace boost { namespace optional_detail { // The condition to use POD implementation @@ -52,10 +50,12 @@ namespace boost { namespace optional_detail { #ifndef BOOST_OPTIONAL_DETAIL_USE_STD_TYPE_TRAITS # define BOOST_OPTIONAL_DETAIL_HAS_TRIVIAL_CTOR(T) BOOST_HAS_TRIVIAL_CONSTRUCTOR(T) #else +# include # define BOOST_OPTIONAL_DETAIL_HAS_TRIVIAL_CTOR(T) std::is_trivially_default_constructible::value #endif +namespace boost { namespace optional_detail { #ifndef BOOST_OPTIONAL_DETAIL_NO_SPEC_FOR_TRIVIAL_TYPES template diff --git a/test/optional_test_map.cpp b/test/optional_test_map.cpp index f16c733..288249c 100644 --- a/test/optional_test_map.cpp +++ b/test/optional_test_map.cpp @@ -140,7 +140,7 @@ void test_map_optional() void test_map_with_lambda() { -#ifndef BOOST_NO_CXX11_LAMBDAS +#if !defined BOOST_NO_CXX11_LAMBDAS && !defined BOOST_NO_CXX11_DECLTYPE_N3276 optional oi (1), oj(2); verify_type >(oi.map([](int i){ return i == 1; })); optional ob = oi.map([](int i){ return i == 1; }); diff --git a/test/optional_xconfig_HACK_TO_LIST_PREDEFINED_MACROS.cpp b/test/optional_xconfig_HACK_TO_LIST_PREDEFINED_MACROS.cpp index e6b6ba0..aa21cf5 100644 --- a/test/optional_xconfig_HACK_TO_LIST_PREDEFINED_MACROS.cpp +++ b/test/optional_xconfig_HACK_TO_LIST_PREDEFINED_MACROS.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2015 Andrzej Krzemienski. +// Copyright (C) 2015 - 2018 Andrzej Krzemienski. // // Use, modification, and distribution is subject to the Boost Software // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at @@ -11,6 +11,7 @@ #include "boost/core/lightweight_test.hpp" #include "boost/optional/detail/optional_config.hpp" +#include "boost/predef.h" #include int main() @@ -37,5 +38,11 @@ int main() BOOST_TEST_EQ(empty, __GNUC_PATCHLEVEL__); BOOST_TEST_EQ(empty, __cplusplus); #endif + + BOOST_TEST_EQ(empty, BOOST_COMP_GNUC); + BOOST_TEST_EQ(empty, BOOST_LANG_STDCPP); + BOOST_TEST_EQ(empty, BOOST_LIB_C_GNU); + BOOST_TEST_EQ(empty, BOOST_LIB_STD_CXX); + return boost::report_errors(); }