Add emplace test
This commit is contained in:
1 parent
5dd9ed7e2c
commit
aa74eb709f
3 files changed
+16
No files matched your search
@@ -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.
|
||||
|
||||
Reference in new issue
Block a user