From 62c037c69c36f305609521238f62d002bfc12b75 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 28 Jun 2018 15:28:51 +0200 Subject: Some more optional constexpr workarounds --- libbutl/optional.mxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'libbutl/optional.mxx') 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 -- cgit v1.1