mirror of
https://github.com/TartanLlama/expected.git
synced 2025-07-31 17:34:31 +02:00
Update expected.hpp
This commit is contained in:
@@ -25,15 +25,6 @@
|
|||||||
#include <type_traits>
|
#include <type_traits>
|
||||||
#include <utility>
|
#include <utility>
|
||||||
|
|
||||||
#if !defined(TL_ASSERT)
|
|
||||||
#if (__cplusplus > 201103L) //can't have assert in constexpr in C++11
|
|
||||||
#include <cassert>
|
|
||||||
#define TL_ASSERT(x) assert(x)
|
|
||||||
#else
|
|
||||||
#define TL_ASSERT(x)
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(__EXCEPTIONS) || defined(_CPPUNWIND)
|
#if defined(__EXCEPTIONS) || defined(_CPPUNWIND)
|
||||||
#define TL_EXPECTED_EXCEPTIONS_ENABLED
|
#define TL_EXPECTED_EXCEPTIONS_ENABLED
|
||||||
#endif
|
#endif
|
||||||
@@ -60,6 +51,16 @@
|
|||||||
#define TL_EXPECTED_GCC55
|
#define TL_EXPECTED_GCC55
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if !defined(TL_ASSERT)
|
||||||
|
//can't have assert in constexpr in C++11 and GCC 4.9 has a compiler bug
|
||||||
|
#if (__cplusplus > 201103L) && !defined(TL_EXPECTED_GCC49)
|
||||||
|
#include <cassert>
|
||||||
|
#define TL_ASSERT(x) assert(x)
|
||||||
|
#else
|
||||||
|
#define TL_ASSERT(x)
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#if (defined(__GNUC__) && __GNUC__ == 4 && __GNUC_MINOR__ <= 9 && \
|
#if (defined(__GNUC__) && __GNUC__ == 4 && __GNUC_MINOR__ <= 9 && \
|
||||||
!defined(__clang__))
|
!defined(__clang__))
|
||||||
// GCC < 5 doesn't support overloading on const&& for member functions
|
// GCC < 5 doesn't support overloading on const&& for member functions
|
||||||
|
Reference in New Issue
Block a user