Skip to content

Commit

Permalink
Bring back is emtpy for std::optional
Browse files Browse the repository at this point in the history
  • Loading branch information
filipsajdak committed Oct 3, 2023
1 parent 17489b2 commit 09e08ea
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions include/cpp2util.h
Original file line number Diff line number Diff line change
Expand Up @@ -1488,11 +1488,9 @@ template<non<void> T, std::same_as<std::optional<T>> X> // same_as needed for cl
constexpr auto is( X const& x ) -> bool
{ return x.has_value(); }

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


// is Value
Expand Down

0 comments on commit 09e08ea

Please sign in to comment.