Skip to content

Commit 7f73d24

Browse files
committed
Add source location info for as contract, further to hsutter#106
1 parent 42a3fe9 commit 7f73d24

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/cpp2util.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -743,7 +743,7 @@ inline constexpr auto as() -> auto
743743
// and trying to cast from a value that is in the half of the value space that isn't
744744
// representable in the target type C is flagged as a Type safety contract violation
745745
template< typename C >
746-
inline constexpr auto as(auto const& x) -> auto
746+
inline constexpr auto as(auto const& x CPP2_SOURCE_LOCATION_PARAM_WITH_DEFAULT) -> auto
747747
requires (
748748
std::is_integral_v<C> &&
749749
std::is_integral_v<CPP2_TYPEOF(x)> &&

0 commit comments

Comments
 (0)