std::optional::reset

std::optional::reset

void reset();
(since C++17)

If *this contains a value, destroy that value as if by value().T::~T(). Otherwise, there are no effects.

*this does not contain a value after this call.

Exceptions

noexcept specification:
noexcept

See also

assigns contents
(public member function)

© cppreference.com
Licensed under the Creative Commons Attribution-ShareAlike Unported License v3.0.
http://en.cppreference.com/w/cpp/utility/optional/reset

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部