Optional: add reset()

It is part of C++17

Change-Id: I2aa4a11133a3d77644f4819492623c8e424ccd59
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
Eike Ziller
2017-06-19 14:16:03 +02:00
parent 59f1f6dc79
commit faae35d2af

View File

@@ -433,6 +433,8 @@ public:
// 20.5.4.2, Destructor
~optional() = default;
void reset() noexcept { clear(); }
// 20.5.4.3, assignment
optional& operator=(nullopt_t) noexcept
{