Skip to content

Commit 7d877c1

Browse files
committed
1 parent 1d455af commit 7d877c1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

include/cpp2util.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -408,7 +408,7 @@ auto assert_in_bounds(auto&& x, auto&& arg CPP2_SOURCE_LOCATION_PARAM_WITH_DEFAU
408408
#endif
409409
}
410410

411-
auto Uncaught_exceptions() -> int {
411+
inline auto Uncaught_exceptions() -> int {
412412
#ifdef CPP2_NO_EXCEPTIONS
413413
return 0;
414414
#else
@@ -888,7 +888,7 @@ auto as( X const& x ) -> auto
888888
// Experiment: Recognize the nested `::value_type` pattern for some dynamic library types
889889
// like std::optional, and try to prevent accidental narrowing conversions even when
890890
// those types themselves don't defend against them
891-
if constexpr( requires{ typename C::value_type; } && std::is_convertible_v<X, typename C::value_type> ) {
891+
if constexpr( requires{ typename C::value_type; } && requires { std::is_convertible_v<X, typename C::value_type>; } ) {
892892
if constexpr( is_narrowing_v<typename C::value_type, X>) {
893893
return nonesuch;
894894
}

0 commit comments

Comments
 (0)