You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"No safe 'as' cast available - if this is narrowing and you're sure the conversion is safe, consider using `unsafe_narrow<T>()` to force the conversion"
755
-
);
752
+
return nonesuch;
756
753
}
757
754
}
758
755
@@ -764,10 +761,7 @@ inline constexpr auto as(auto const& x) -> auto
"No safe 'as' cast from larger to smaller floating point precision - if you're sure you want this unsafe conversion, consider using `unsafe_narrow<T>()` to force the conversion"
770
-
);
764
+
return nonesuch;
771
765
}
772
766
773
767
// Signed/unsigned conversions to a not-smaller type are handled as a precondition,
@@ -805,10 +799,7 @@ auto as( X const& x ) -> auto
805
799
// those types themselves don't defend against them
"This is a narrowing 'as' cast to a dynamic library type - if you're sure you want this unsafe conversion, consider adding an `unsafe_narrow<T>()` separately first to force the narrowing conversion, then 'as' to the library type"
811
-
);
802
+
return nonesuch;
812
803
}
813
804
}
814
805
return C{x};
@@ -1296,6 +1287,64 @@ auto unsafe_narrow( X&& x ) noexcept -> decltype(auto)
0 commit comments