Open steve-downey opened 1 month ago
Avoids an infinite recursion in comparison operators. Fixed in standard.
namespace detail { template <class T> concept is_optional = requires(const T& t) { // exposition only []<class U>(const optional<U>&) {}(t); };
TODO: add test cases inheriting from optional.
Note - Bloomberg actually ran into this with moving to C++20 and spaceship synthesis of comparison operators, and one of our nullable types.
Avoids an infinite recursion in comparison operators. Fixed in standard.
TODO: add test cases inheriting from optional.
Note - Bloomberg actually ran into this with moving to C++20 and spaceship synthesis of comparison operators, and one of our nullable types.