result_of
specification also needs a little cleanupSection: D.14 [depr.meta.types] Status: C++20 Submitter: Daniel Krügler Opened: 2017-03-04 Last modified: 2021-02-25
Priority: 3
View all other issues in [depr.meta.types].
View all issues with C++20 status.
Discussion:
P0604R0 missed a similar adjustment that was performed for the
deprecated type trait templates is_literal_type
and is_literal_type_v
via LWG 2838:
result_of
to Annex D means that the general prohibition against specializing type traits
in [meta.type.synop]/1 does no longer exist, so should be explicitly spelled out. Wording will be provided
after publication of the successor of N4640.
[2017-03-04, Kona]
Set priority to 3
[2017-04-24, Daniel provides wording]
Instead of enumerating all the templates where adding a specialization is valid, a general exclusion rule is provided. Albeit currently not needed for the templates handled by this sub-clause, a potential exception case is constructed to ensure correctness for the first deprecated trait template that would permit specializations by the user.
[2017-06-10, Moved to Tentatively Ready after 6 positive votes on c++std-lib]
Proposed resolution:
This wording is relative to N4659.
Change D.14 [depr.meta.types] as indicated:
-4- The behavior of a program that adds specializations for any of the templates defined in this subclause
is undefined, unless explicitly permitted by the specification of the corresponding template.is_literal_type
oris_literal_type_v