Created on 2026-02-17.00:00:00 last changed 1 week ago
Proposed resolution:
This wording is relative to N5032 with changes from 4500.
Modify [const.wrap.class], class template `constant_wrapper` synopsis, as indicated:
template<cw-fixed-value X, class>
struct constant_wrapper : cw-operators {
static constexpr const auto & value = X.data;
using type = constant_wrapper;
using value_type = decltype(X)::type;
template<constexpr-param R>
constexpr auto operator=(R) const noexcept
-> constant_wrapper<(valueX = R::value)> { return {}; }
constexpr operator decltype(auto)() const noexcept { return value; }
};
[ 2026-02-27; Reflector poll. ]
Set status to Tentatively Ready after 9 votes in favour during reflector poll.
During resolution of LWG 4383 assignment operator of constant_wrapper,
was changed to:
template<constexpr-param R>
constexpr auto operator=(R) const noexcept -> constant_wrapper<X = R::value> { return {}; }
This is incorrect (and inconsistent with other operators), as we assign to `X` that is object of specialization of exposition only cw-fixed-value, instead of `value`.
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2026-02-27 16:05:19 | admin | set | messages: + msg15979 |
| 2026-02-27 16:05:19 | admin | set | status: new -> ready |
| 2026-02-17 17:39:09 | admin | set | messages: + msg15932 |
| 2026-02-17 00:00:00 | admin | create | |