From c194f73a0726bdea33d1ec3708ee1d2466eeaabc Mon Sep 17 00:00:00 2001 From: johvik Date: Wed, 23 Jan 2019 08:38:31 +0100 Subject: [PATCH] Return value() in noexcept emplace --- tl/optional.hpp | 1 + 1 file changed, 1 insertion(+) diff --git a/tl/optional.hpp b/tl/optional.hpp index 88ce30e..7350f8a 100644 --- a/tl/optional.hpp +++ b/tl/optional.hpp @@ -2252,6 +2252,7 @@ public: *this = nullopt; this->construct(std::forward(args)...); + return value(); } /// Swaps this optional with the other.