Created on 2022-11-04.00:00:00 last changed 24 months ago
Proposed resolution:
This wording is relative to N4840.
Modify [propagate_const.const_observers] as indicated:
constexpr operator const element_type*() const;-7- Returns: get().
-8- Remarks: This function shall not participate in overload resolution unless T is an object pointer type or const T has an implicit conversion to const element_type*.
[ Kona 2022-11-12; Set priority to 3 ]
Addresses: fund.ts.v3
This issue has its origin in the discussion of gcc issue 107525.
The current draft of LFTSv3 specifies this conversion function for propagate_const in [propagate_const.const_observers]:constexpr operator const element_type*() const;-7- Returns: get().
-8- Remarks: This function shall not participate in overload resolution unless T is an object pointer type or has an implicit conversion to const element_type*.
The constraint should however specify that const T (and not T) needs to have an implicit conversion to const element_type *.
Basically: if const T cannot do the conversion, then neither const propagate_const<T> should be able to. One can design a type X such as a const X cannot convert to const element_type * (for instance, by =deleteing the corresponding conversion function). If now one asks whether const propagate_const<X> is convertible to const element_type *, the answer is (surprisingly) "yes".History | |||
---|---|---|---|
Date | User | Action | Args |
2022-11-12 01:08:30 | admin | set | messages: + msg13036 |
2022-11-05 15:55:24 | admin | set | messages: + msg12933 |
2022-11-04 00:00:00 | admin | create |