cplusplus/fundamentals-ts

Coherency while setting to a not-a-value

viboes opened this issue · 1 comments

any provides a any::clear() to unset the value while optional uses assignment from nullopt.

Boost.Optional uses none_t instead, which could be used also for any and other types (e.g. variant).

The C++ standard should be coherent for features that behave the same way on different types.

Please file feature requests on https://issues.isocpp.org/, and only editorial problems here.