Skip to content

Commit 09e08ea

Browse files
committed
Bring back is emtpy for std::optional
1 parent 17489b2 commit 09e08ea

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

include/cpp2util.h

+3-5
Original file line numberDiff line numberDiff line change
@@ -1488,11 +1488,9 @@ template<non<void> T, std::same_as<std::optional<T>> X> // same_as needed for cl
14881488
constexpr auto is( X const& x ) -> bool
14891489
{ return x.has_value(); }
14901490

1491-
// handled by pointer_like overload is it good?
1492-
//
1493-
// template<std::same_as<empty> T, non<void> U>
1494-
// constexpr auto is( std::optional<U> const& x ) -> bool
1495-
// { return !x.has_value(); }
1491+
template<std::same_as<empty> T, non<void> U>
1492+
constexpr auto is( std::optional<U> const& x ) -> bool
1493+
{ return !x.has_value(); }
14961494

14971495

14981496
// is Value

0 commit comments

Comments
 (0)