From d92ed4b0cbfca832d2b783262d4265ca866cc128 Mon Sep 17 00:00:00 2001 From: Simon Brand Date: Sun, 29 Oct 2017 20:25:40 +0000 Subject: [PATCH] Call function --- expected.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/expected.hpp b/expected.hpp index 5b14d0e..5108ee7 100644 --- a/expected.hpp +++ b/expected.hpp @@ -42,7 +42,7 @@ #if (__cplusplus == 201103L || defined(TL_EXPECTED_MSVC2015) || \ defined(TL_EXPECTED_GCC49)) && \ - !defined(TL_EXPECTED_GCC50) + !defined(TL_EXPECTED_GCC54) /// \exclude #define TL_EXPECTED_11_CONSTEXPR #else @@ -995,7 +995,7 @@ public: void emplace(std::initializer_list il, Args &&... args) { if (has_value()) { T t (il, std::forward(args)...); - *val = std::move(t); + val() = std::move(t); } else { err().~unexpected(); @@ -1009,7 +1009,7 @@ public: void emplace(std::initializer_list il, Args &&... args) { if (has_value()) { T t (il, std::forward(args)...); - *val = std::move(t); + val() = std::move(t); } else { auto tmp = std::move(err());