forked from TartanLlama/optional
C++11 fixes
This commit is contained in:
@ -8,7 +8,7 @@
|
||||
REQUIRE(e);
|
||||
|
||||
TEST_CASE("Constexpr", "[constexpr]") {
|
||||
#if !defined(TL_OPTIONAL_MSVC2015) && !defined(TL_OPTIONAL_GCC49)
|
||||
#if !defined(TL_OPTIONAL_MSVC2015) && defined(TL_OPTIONAL_CXX14)
|
||||
SECTION("empty construct") {
|
||||
constexpr tl::optional<int> o2{};
|
||||
constexpr tl::optional<int> o3 = {};
|
||||
|
@ -133,7 +133,7 @@ TEST_CASE("Monadic operations", "[monadic]") {
|
||||
}
|
||||
|
||||
SECTION("map constexpr") {
|
||||
#if !defined(_MSC_VER) && !defined(TL_OPTIONAL_GCC49)
|
||||
#if !defined(_MSC_VER) && defined(TL_OPTIONAL_CXX14)
|
||||
// test each overload in turn
|
||||
constexpr tl::optional<int> o16 = 42;
|
||||
constexpr auto o16r = o16.map(get_int);
|
||||
@ -243,7 +243,7 @@ TEST_CASE("Monadic operations", "[monadic]") {
|
||||
}
|
||||
|
||||
SECTION("constexpr and_then") {
|
||||
#if !defined(_MSC_VER) && !defined(TL_OPTIONAL_GCC49)
|
||||
#if !defined(_MSC_VER) && defined(TL_OPTIONAL_CXX14)
|
||||
|
||||
constexpr tl::optional<int> o10 = 42;
|
||||
constexpr auto o10r = o10.and_then(get_opt_int);
|
||||
|
Reference in New Issue
Block a user