mirror of
https://github.com/TartanLlama/expected.git
synced 2025-08-03 19:04:29 +02:00
Call function
This commit is contained in:
@@ -42,7 +42,7 @@
|
|||||||
|
|
||||||
#if (__cplusplus == 201103L || defined(TL_EXPECTED_MSVC2015) || \
|
#if (__cplusplus == 201103L || defined(TL_EXPECTED_MSVC2015) || \
|
||||||
defined(TL_EXPECTED_GCC49)) && \
|
defined(TL_EXPECTED_GCC49)) && \
|
||||||
!defined(TL_EXPECTED_GCC50)
|
!defined(TL_EXPECTED_GCC54)
|
||||||
/// \exclude
|
/// \exclude
|
||||||
#define TL_EXPECTED_11_CONSTEXPR
|
#define TL_EXPECTED_11_CONSTEXPR
|
||||||
#else
|
#else
|
||||||
@@ -995,7 +995,7 @@ public:
|
|||||||
void emplace(std::initializer_list<U> il, Args &&... args) {
|
void emplace(std::initializer_list<U> il, Args &&... args) {
|
||||||
if (has_value()) {
|
if (has_value()) {
|
||||||
T t (il, std::forward<Args>(args)...);
|
T t (il, std::forward<Args>(args)...);
|
||||||
*val = std::move(t);
|
val() = std::move(t);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
err().~unexpected<E>();
|
err().~unexpected<E>();
|
||||||
@@ -1009,7 +1009,7 @@ public:
|
|||||||
void emplace(std::initializer_list<U> il, Args &&... args) {
|
void emplace(std::initializer_list<U> il, Args &&... args) {
|
||||||
if (has_value()) {
|
if (has_value()) {
|
||||||
T t (il, std::forward<Args>(args)...);
|
T t (il, std::forward<Args>(args)...);
|
||||||
*val = std::move(t);
|
val() = std::move(t);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
auto tmp = std::move(err());
|
auto tmp = std::move(err());
|
||||||
|
Reference in New Issue
Block a user