We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1269838 commit c9929a6Copy full SHA for c9929a6
include/cpp2util.h
@@ -880,7 +880,7 @@ auto as( X const& x ) -> auto
880
// Experiment: Recognize the nested `::value_type` pattern for some dynamic library types
881
// like std::optional, and try to prevent accidental narrowing conversions even when
882
// those types themselves don't defend against them
883
- if constexpr( requires{ typename C::value_type; } && std::is_convertible_v<X, typename C::value_type> ) {
+ if constexpr( requires{ typename C::value_type; } && requires { std::is_convertible_v<X, typename C::value_type>; } ) {
884
if constexpr( is_narrowing_v<typename C::value_type, X>) {
885
return nonesuch;
886
}
0 commit comments