forked from TartanLlama/optional
Correct GCC5.5 macro
This commit is contained in:
@ -133,7 +133,7 @@ TEST_CASE("Monadic operations", "[monadic]") {
|
|||||||
}
|
}
|
||||||
|
|
||||||
SECTION("map constexpr") {
|
SECTION("map constexpr") {
|
||||||
#if !defined(_MSC_VER) && defined(TL_OPTIONAL_CXX14) && !defined(TL_OPTIONAL_GCC55)
|
#if !defined(_MSC_VER) && defined(TL_OPTIONAL_CXX14)
|
||||||
// test each overload in turn
|
// test each overload in turn
|
||||||
constexpr tl::optional<int> o16 = 42;
|
constexpr tl::optional<int> o16 = 42;
|
||||||
constexpr auto o16r = o16.map(get_int);
|
constexpr auto o16r = o16.map(get_int);
|
||||||
@ -248,7 +248,7 @@ TEST_CASE("Monadic operations", "[monadic]") {
|
|||||||
}
|
}
|
||||||
|
|
||||||
SECTION("constexpr and_then") {
|
SECTION("constexpr and_then") {
|
||||||
#if !defined(_MSC_VER) && defined(TL_OPTIONAL_CXX14) && !defined(TL_OPTIONAL_GCC55)
|
#if !defined(_MSC_VER) && defined(TL_OPTIONAL_CXX14)
|
||||||
|
|
||||||
constexpr tl::optional<int> o10 = 42;
|
constexpr tl::optional<int> o10 = 42;
|
||||||
constexpr auto o10r = o10.and_then(get_opt_int);
|
constexpr auto o10r = o10.and_then(get_opt_int);
|
||||||
|
@ -38,7 +38,7 @@
|
|||||||
#define TL_OPTIONAL_GCC54
|
#define TL_OPTIONAL_GCC54
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if (defined(__GNUC__) && __GNUC__ == 5 && __GNUC_MINOR__ <= 4 && \
|
#if (defined(__GNUC__) && __GNUC__ == 5 && __GNUC_MINOR__ <= 5 && \
|
||||||
!defined(__clang__))
|
!defined(__clang__))
|
||||||
#define TL_OPTIONAL_GCC55
|
#define TL_OPTIONAL_GCC55
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user