forked from boostorg/system
Add constexpr_test2.cpp
This commit is contained in:
@ -124,6 +124,8 @@ boost_test(TYPE run SOURCES std_interop_test14.cpp)
|
||||
boost_test(TYPE run SOURCES ec_location_test3.cpp)
|
||||
boost_test(TYPE run SOURCES ec_location_test4.cpp)
|
||||
|
||||
boost_test(TYPE compile SOURCES constexpr_test2.cpp)
|
||||
|
||||
# result
|
||||
|
||||
set(BOOST_TEST_COMPILE_FEATURES cxx_std_11)
|
||||
|
@ -152,6 +152,8 @@ run std_interop_test14.cpp ;
|
||||
run ec_location_test3.cpp ;
|
||||
run ec_location_test4.cpp ;
|
||||
|
||||
compile constexpr_test2.cpp ;
|
||||
|
||||
# result
|
||||
|
||||
import ../../config/checks/config : requires ;
|
||||
|
26
test/constexpr_test2.cpp
Normal file
26
test/constexpr_test2.cpp
Normal file
@ -0,0 +1,26 @@
|
||||
// Copyright 2022 Peter Dimov.
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// https://www.boost.org/LICENSE_1_0.txt
|
||||
|
||||
#include <boost/system/error_code.hpp>
|
||||
#include <boost/config.hpp>
|
||||
#include <boost/config/pragma_message.hpp>
|
||||
|
||||
#if defined(BOOST_GCC) && BOOST_GCC >= 40700 && BOOST_GCC < 40800
|
||||
|
||||
BOOST_PRAGMA_MESSAGE("Skipping test, BOOST_GCC is 407xx")
|
||||
|
||||
#else
|
||||
|
||||
struct X
|
||||
{
|
||||
boost::system::error_code ec;
|
||||
};
|
||||
|
||||
X const& f()
|
||||
{
|
||||
BOOST_STATIC_CONSTEXPR X x;
|
||||
return x;
|
||||
}
|
||||
|
||||
#endif
|
Reference in New Issue
Block a user