diff --git a/CMakeLists.txt b/CMakeLists.txt index fe45fae..9b46f9d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -25,6 +25,7 @@ target_include_directories(expected INTERFACE ${CMAKE_SOURCE_DIR}/tl) target_link_libraries(tests Catch expected) set_property(TARGET tests PROPERTY CXX_STANDARD 14) +set_property(TARGET tests PROPERTY CXX_FLAGS "-Wall -Wextra") find_package(standardese) # find standardese after installation diff --git a/tl/expected.hpp b/tl/expected.hpp index 7ab89a7..2caaa39 100644 --- a/tl/expected.hpp +++ b/tl/expected.hpp @@ -81,8 +81,7 @@ #endif #if (__cplusplus == 201103L || defined(TL_EXPECTED_MSVC2015) || \ - defined(TL_EXPECTED_GCC49)) && \ - !defined(TL_EXPECTED_GCC54) + defined(TL_EXPECTED_GCC49)) /// \exclude #define TL_EXPECTED_11_CONSTEXPR #else @@ -1702,7 +1701,7 @@ public: /// /// \group value template ::value>* = nullptr> - TL_EXPECTED_GCC49_CONSTEXPR const U &value() const & { + TL_EXPECTED_11_CONSTEXPR const U &value() const & { if (!has_value()) throw bad_expected_access(err().value()); return val(); @@ -1716,7 +1715,7 @@ public: } /// \group value template ::value>* = nullptr> - TL_EXPECTED_GCC49_CONSTEXPR const U &&value() const && { + TL_EXPECTED_11_CONSTEXPR const U &&value() const && { if (!has_value()) throw bad_expected_access(err().value()); return std::move(val());