Created on 2023-02-17.00:00:00 last changed 20 months ago
Proposed resolution:
This wording is relative to N4928.
Modify [special.mem.concepts] as indicated:
template<class I> concept nothrow-input-iterator = // exposition only input_iterator<I> && is_lvalue_reference_v<iter_reference_t<I>> && same_as<remove_cvref_t<iter_reference_t<I>>, remove_reference_t<iter_reference_t<I>> && same_as<remove_cvref_t<iter_reference_t<I>>, iter_value_t<I>>;
Modify [specialized.construct] as indicated:
template<class T, class... Args> constexpr T* construct_at(T* location, Args&&... args); namespace ranges { template<class T, class... Args> constexpr T* construct_at(T* location, Args&&... args); }-1- Constraints: T is a cv-unqualified type, and t
-2- Effects: Equivalent to:The expression ::new (declval<void*>()) T(declval<Args>()...) is well-formed when treated as an unevaluated operand ([expr.context]).return ::new (voidify(*location)) T(std::forward<Args>(args)...);
[ 2023-03-22; Reflector poll ]
Set priority to 3 after reflector poll.
LWG 3870 removed the support for constructing objects via cv-qualified lvalues. However, it had not changed anything in the immediate context, which means some previously permitted usages become hard errors instead of substitution failures.
Note that ranges::uninitialized_default_construct and ranges::uninitialized_default_construct_n are underconstrained even before LWG 3870, because remove_reference_t<iter_reference_t<I>> may be a const type, while only it's cv-unqualified version (iter_value_t<I>) is required to be default_initializable. construct_at and ranges::construct_at are also made underconstrained because the function body is no longer valid when T is cv-qualified, which is not reflected in Constraints:.History | |||
---|---|---|---|
Date | User | Action | Args |
2023-03-22 22:40:39 | admin | set | messages: + msg13475 |
2023-02-19 15:59:26 | admin | set | messages: + msg13422 |
2023-02-17 00:00:00 | admin | create |