C++11 fixes

This commit is contained in:
Simon Brand
2018-02-23 09:34:05 +00:00
parent 27b2163d10
commit dccbc0b23e
2 changed files with 3 additions and 3 deletions

View File

@ -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 = {};

View File

@ -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);