Skip to content

Commit 1a95ab1

Browse files
committed
1328 Fixed issue comparing different numerical types as equal.
1 parent 8a99d2e commit 1a95ab1

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

include/cpp2util.h

+1-4
Original file line numberDiff line numberDiff line change
@@ -2102,10 +2102,7 @@ constexpr auto is( X const& x ) -> bool {
21022102
if (!x.has_value()) {
21032103
return std::same_as<T, empty>;
21042104
}
2105-
if constexpr (requires { static_cast<const T&>(*x);}) {
2106-
return true;
2107-
}
2108-
return false;
2105+
return std::same_as<T, typename X::value_type>;
21092106
}
21102107

21112108
// is Value

0 commit comments

Comments
 (0)