Created on 2023-06-20.00:00:00 last changed 13 months ago
Proposed resolution:
This wording is relative to N4950.
Modify [ranges.syn], header <ranges> synopsis, as indicated:
[…]
// [range.as.const], as const view
template<input_range R>
constexpr auto& possibly-const-range(R& r) noexcept { // exposition only
if constexpr (constant_range<const R> && !constant_range<R>) {
return const_cast<const R&>(r);
} else {
return r;
}
}
[…]
Modify [range.prim.cdata] before p1 as indicated:
template<class T> constexpr auto as-const-pointer(const T* p) noexcept { return p; } // exposition only
[ 2023-11-11 Approved at November 2023 meeting in Kona. Status changed: Voting → WP. ]
[ 2023-10-27; Reflector poll ]
Set status to Tentatively Ready after five votes in favour during reflector poll.
As of P2278R4, several range access CPOs are specified with possibly-const-range and as-const-pointer. These helper functions never throw exceptions, but are not marked with noexcept. As a result, implementations are currently allowed to make a call to ranges::ccpo potentially throwing while the underlying ranges::cpo call is non-throwing, which doesn't seem to be intended.
History | |||
---|---|---|---|
Date | User | Action | Args |
2023-11-13 14:08:10 | admin | set | messages: + msg13844 |
2023-11-13 14:08:10 | admin | set | status: voting -> wp |
2023-11-07 21:41:54 | admin | set | status: ready -> voting |
2023-10-27 21:22:44 | admin | set | messages: + msg13763 |
2023-10-27 21:22:44 | admin | set | status: new -> ready |
2023-06-25 08:39:56 | admin | set | messages: + msg13662 |
2023-06-20 00:00:00 | admin | create |