Skip to content

Commit b1393ed

Browse files
jensmaurerzygoloid
authored andcommitted
LWG2139 What is a user-defined type?
Some of the underlying text has changed, and the edits were applied to the changed text. There is one remaining appearance of 'user-defined type' in [namespace.std], which was not changed.
1 parent a8c41a9 commit b1393ed

File tree

5 files changed

+27
-9
lines changed

5 files changed

+27
-9
lines changed

source/diagnostics.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -918,7 +918,7 @@
918918

919919
\pnum
920920
The \tcode{is_error_code_enum} and \tcode{is_error_condition_enum} may be
921-
specialized for user-defined types to indicate that such types are eligible
921+
specialized for program-defined types to indicate that such types are eligible
922922
for \tcode{class error_code} and \tcode{class error_condition} automatic
923923
conversions, respectively.
924924

source/lib-intro.tex

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,24 @@
283283
member functions\iref{class.this}.
284284
\end{defnote}
285285

286+
\definition{program-defined specialization}{defns.prog.def.spec}
287+
\indexdefn{specialization!program-defined}%
288+
explicit template specialization or partial specialization
289+
that is not part of the C++ standard library and
290+
not defined by the implementation
291+
292+
\definition{program-defined type}{defns.prog.def.type}
293+
\indexdefn{type!program-defined}%
294+
class type or enumeration type
295+
that is not part of the C++ standard library and
296+
not defined by the implementation,
297+
or an instantiation of a program-defined specialization
298+
299+
\begin{defnote}
300+
Types defined by the implementation include
301+
extensions\iref{intro.compliance} and internal types used by the library.
302+
\end{defnote}
303+
286304
\definition{referenceable type}{defns.referenceable}
287305
\indexdefn{type!referenceable}%
288306
type that is either an
@@ -2169,7 +2187,7 @@
21692187
to namespace
21702188
\tcode{std} provided that
21712189
(a) the added declaration
2172-
depends on at least one user-defined type
2190+
depends on at least one program-defined type
21732191
and
21742192
(b) the specialization meets the standard library requirements
21752193
for the original template.\footnote{Any
@@ -2202,7 +2220,7 @@
22022220
A program may explicitly instantiate
22032221
a class template defined in the standard library
22042222
only if the declaration
2205-
(a) depends on the name of at least one user-defined type
2223+
(a) depends on the name of at least one program-defined type
22062224
and
22072225
(b) the instantiation meets the standard library requirements for the
22082226
original template.

source/locales.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1908,7 +1908,7 @@
19081908
Specializations on
19091909
\tcode{mbstate_t}
19101910
perform conversion between encodings known to the library implementer.
1911-
Other encodings can be converted by specializing on a user-defined
1911+
Other encodings can be converted by specializing on a program-defined
19121912
\tcode{stateT}
19131913
type.
19141914
Objects of type

source/regex.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3651,7 +3651,7 @@
36513651

36523652
\pnum
36533653
\begin{note} This means that a compiler may call an
3654-
implementation-specific search function, in which case a user-defined
3654+
implementation-specific search function, in which case a program-defined
36553655
specialization of \tcode{regex_search} will not be
36563656
called. \end{note}
36573657
\end{itemdescr}

source/utilities.tex

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7150,7 +7150,7 @@
71507150
is valid and denotes a type\iref{temp.deduct} and
71517151
\tcode{is_convertible_v<Alloc, T::allocator_type> != false}, otherwise it shall be
71527152
derived from \tcode{false_type}. A program may specialize this template to derive from
7153-
\tcode{true_type} for a user-defined type \tcode{T} that does not have a nested
7153+
\tcode{true_type} for a program-defined type \tcode{T} that does not have a nested
71547154
\tcode{allocator_type} but nonetheless can be constructed with an allocator where
71557155
either:
71567156

@@ -14281,7 +14281,7 @@
1428114281
shall provide a definition that has a base characteristic of
1428214282
\tcode{true_type} if \tcode{T} is a type returned from \tcode{bind},
1428314283
otherwise it shall have a base characteristic of \tcode{false_type}.
14284-
A program may specialize this template for a user-defined type \tcode{T}
14284+
A program may specialize this template for a program-defined type \tcode{T}
1428514285
to have a base characteristic of \tcode{true_type} to indicate that
1428614286
\tcode{T} should be treated as a subexpression in a \tcode{bind} call.
1428714287

@@ -14306,7 +14306,7 @@
1430614306
\tcode{integral_constant<int, \placeholder{J}>} if \tcode{T} is the type of
1430714307
\tcode{std::placeholders::_\placeholder{J}}, otherwise it shall have a
1430814308
base characteristic of \tcode{integral_constant<int, 0>}. A program
14309-
may specialize this template for a user-defined type \tcode{T} to
14309+
may specialize this template for a program-defined type \tcode{T} to
1431014310
have a base characteristic of \tcode{integral_constant<int, N>}
1431114311
with \tcode{N > 0} to indicate that \tcode{T} should be
1431214312
treated as a placeholder type.
@@ -15271,7 +15271,7 @@
1527115271
\item satisfy the requirement that the expression \tcode{h(k)}, where \tcode{h}
1527215272
is an object of type \tcode{hash<Key>} and \tcode{k} is an object of type
1527315273
\tcode{Key}, shall not throw an exception unless \tcode{hash<Key>} is a
15274-
user-defined specialization that depends on at least one user-defined type.
15274+
program-defined specialization that depends on at least one program-defined type.
1527515275
\end{itemize}
1527615276

1527715277
\rSec1[meta]{Metaprogramming and type traits}

0 commit comments

Comments
 (0)