This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of Tentatively Ready status.
integral-constant-like needs more remove_cvref_tSection: 23.7.2.1 [span.syn] Status: Tentatively Ready Submitter: Jonathan Wakely Opened: 2025-09-05 Last modified: 2025-10-17
Priority: Not Prioritized
View all issues with Tentatively Ready status.
Discussion:
P2781R9 tweaked the definition of
integral-constant-like to work with constant_wrapper,
like so:
template<class T>
concept integral-constant-like = // exposition only
is_integral_v<remove_cvref_t<decltype(T::value)>> &&
!is_same_v<bool, remove_const_t<decltype(T::value)>> &&
convertible_to<T, decltype(T::value)> &&
equality_comparable_with<T, decltype(T::value)> &&
bool_constant<T() == T::value>::value &&
bool_constant<static_cast<decltype(T::value)>(T()) == T::value>::value;
This was done so that cw<5> models the concept,
but it needs an additional tweak so that
cw<true> does not model it.
[2025-10-17; Reflector poll.]
Set status to Tentatively Ready after eight votes in favour during reflector poll.
Proposed resolution:
This wording is relative to N5014.
Modify 23.7.2.1 [span.syn] as indicated:
template<class T>
concept integral-constant-like = // exposition only
is_integral_v<remove_cvref_t<decltype(T::value)>> &&
!is_same_v<bool, remove_cvrefconst_t<decltype(T::value)>> &&
convertible_to<T, decltype(T::value)> &&
equality_comparable_with<T, decltype(T::value)> &&
bool_constant<T() == T::value>::value &&
bool_constant<static_cast<decltype(T::value)>(T()) == T::value>::value;