aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2018-06-28 15:28:51 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2018-06-28 15:28:51 +0200
commit62c037c69c36f305609521238f62d002bfc12b75 (patch)
tree6f6d108c84275f0c2dce2f58a2c73e4c63303b99
parentb5545e98eb4ecc39eb390d916cf7d909b9d69e4b (diff)
Some more optional constexpr workarounds
-rw-r--r--libbutl/optional.mxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/libbutl/optional.mxx b/libbutl/optional.mxx
index de56d05..e7e00dd 100644
--- a/libbutl/optional.mxx
+++ b/libbutl/optional.mxx
@@ -65,7 +65,7 @@ LIBBUTL_MODEXPORT namespace butl
#endif
#if (!defined(_MSC_VER) || _MSC_VER > 1900) && \
- (!defined(__GNUC__) || __GNUC__ >= 5)
+ (!defined(__GNUC__) || __GNUC__ > 4 || defined(__clang__))
constexpr optional_data (const optional_data& o): v_ (o.v_) {if (v_) new (&d_) T (o.d_);}
constexpr optional_data (optional_data&& o): v_ (o.v_) {if (v_) new (&d_) T (std::move (o.d_));}
#else
@@ -108,7 +108,7 @@ LIBBUTL_MODEXPORT namespace butl
#endif
#if (!defined(_MSC_VER) || _MSC_VER > 1900) && \
- (!defined(__GNUC__) || __GNUC__ >= 5)
+ (!defined(__GNUC__) || __GNUC__ > 4 || defined(__clang__))
constexpr optional_data (const optional_data& o): v_ (o.v_) {if (v_) new (&d_) T (o.d_);}
constexpr optional_data (optional_data&& o): v_ (o.v_) {if (v_) new (&d_) T (std::move (o.d_));}
#else
@@ -146,7 +146,7 @@ LIBBUTL_MODEXPORT namespace butl
#endif
#if (!defined(_MSC_VER) || _MSC_VER > 1900) && \
- (!defined(__GNUC__) || __GNUC__ >= 5)
+ (!defined(__GNUC__) || __GNUC__ > 4 || defined(__clang__))
constexpr optional (const optional&) = default;
constexpr optional (optional&&) = default;
#else