Add emplace test

This commit is contained in:
Simon Brand
2018-07-11 14:32:25 +01:00
parent 5dd9ed7e2c
commit aa74eb709f
3 changed files with 16 additions and 0 deletions
+2
View File
@@ -1258,6 +1258,7 @@ public:
*this = nullopt;
this->construct(std::forward<Args>(args)...);
return value();
}
/// \group emplace
@@ -1269,6 +1270,7 @@ public:
emplace(std::initializer_list<U> il, Args &&... args) {
*this = nullopt;
this->construct(il, std::forward<Args>(args)...);
return value();
}
/// Swaps this optional with the other.