There seems to be no reason to prefer a class template to a variable template, it just makes it slower to compile. Why decay_t not remove_cvref_t? Or why do that at all? All uses of is_optional already use either remove_cvref or decay (which should be remove_cvref in all cases), except for the use in optional<T&>::and_then which is probably incorrect.
https://github.com/beman-project/Optional26/blob/bfeb9080c0d9c501965ae857a1decf7ed74686f5/include/Beman/Optional26/optional.hpp#L237-L242
There seems to be no reason to prefer a class template to a variable template, it just makes it slower to compile. Why
decay_t
notremove_cvref_t
? Or why do that at all? All uses ofis_optional
already use eitherremove_cvref
ordecay
(which should beremove_cvref
in all cases), except for the use inoptional<T&>::and_then
which is probably incorrect.