beman-project / optional26

Beman.Optional26: `std::optional` extensions targeting C++26
Apache License 2.0
13 stars 8 forks source link

Destructor is not constexpr #37

Open jwakely opened 2 months ago

jwakely commented 2 months ago

https://github.com/beman-project/Optional26/blob/bfeb9080c0d9c501965ae857a1decf7ed74686f5/include/Beman/Optional26/optional.hpp#L332-L338

jwakely commented 2 months ago

And the assignment operators:

https://github.com/beman-project/Optional26/blob/bfeb9080c0d9c501965ae857a1decf7ed74686f5/include/Beman/Optional26/optional.hpp#L432

jwakely commented 2 months ago

And all emplace overloads, and swap, and reset.

jwakely commented 2 months ago

There don't seem to be any tests using optional in constant expressions, except for a handful for and_then (but not the other monadic ops, see #42).

steve-downey commented 2 months ago

The non-reference side is undertested.