Created on 2023-06-20.00:00:00 last changed 2 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
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-06-25 08:39:56 | admin | set | messages: + msg13662 |
2023-06-20 00:00:00 | admin | create |