From Jason Turner

[namespace.constraints]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmpelvbhoh4/{from.md → to.md} +26 -7
tmp/tmpelvbhoh4/{from.md → to.md} RENAMED
@@ -6,13 +6,16 @@ Unless otherwise specified, the behavior of a C++ program is undefined
6
  if it adds declarations or definitions to namespace `std` or to a
7
  namespace within namespace `std`.
8
 
9
  Unless explicitly prohibited, a program may add a template
10
  specialization for any standard library class template to namespace
11
- `std` provided that (a) the added declaration depends on at least one
12
- program-defined type and (b) the specialization meets the standard
13
- library requirements for the original template.[^21]
 
 
 
14
 
15
  The behavior of a C++ program is undefined if it declares an explicit or
16
  partial specialization of any standard library variable template, except
17
  where explicitly permitted by the specification of that variable
18
  template.
@@ -30,13 +33,15 @@ The behavior of a C++ program is undefined if it declares
30
  - an explicit or partial specialization of any member class template of
31
  a standard library class or class template, or
32
  - a deduction guide for any standard library class template.
33
 
34
  A program may explicitly instantiate a class template defined in the
35
- standard library only if the declaration (a) depends on the name of at
36
- least one program-defined type and (b) the instantiation meets the
37
- standard library requirements for the original template.
 
 
38
 
39
  Let `F` denote a standard library function [[global.functions]], a
40
  standard library static member function, or an instantiation of a
41
  standard library function template. Unless `F` is designated an
42
  *addressable function*, the behavior of a C++ program is unspecified
@@ -52,19 +57,33 @@ Moreover, the behavior of a C++ program is unspecified (possibly
52
  ill-formed) if it attempts to form a reference to `F` or if it attempts
53
  to form a pointer-to-member designating either a standard library
54
  non-static member function [[member.functions]] or an instantiation of a
55
  standard library member function template.
56
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
57
  A translation unit shall not declare namespace `std` to be an inline
58
  namespace [[namespace.def]].
59
 
60
  ##### Namespace `posix` <a id="namespace.posix">[[namespace.posix]]</a>
61
 
62
  The behavior of a C++ program is undefined if it adds declarations or
63
  definitions to namespace `posix` or to a namespace within namespace
64
  `posix` unless otherwise specified. The namespace `posix` is reserved
65
- for use by ISO/IEC/IEEE 9945 and other POSIX standards.
66
 
67
  ##### Namespaces for future standardization <a id="namespace.future">[[namespace.future]]</a>
68
 
69
  Top-level namespaces whose *namespace-name* consists of `std` followed
70
  by one or more *digit*s [[lex.name]] are reserved for future
 
6
  if it adds declarations or definitions to namespace `std` or to a
7
  namespace within namespace `std`.
8
 
9
  Unless explicitly prohibited, a program may add a template
10
  specialization for any standard library class template to namespace
11
+ `std` provided that
12
+
13
+ - the added declaration depends on at least one program-defined type,
14
+ and
15
+ - the specialization meets the standard library requirements for the
16
+ original template.[^21]
17
 
18
  The behavior of a C++ program is undefined if it declares an explicit or
19
  partial specialization of any standard library variable template, except
20
  where explicitly permitted by the specification of that variable
21
  template.
 
33
  - an explicit or partial specialization of any member class template of
34
  a standard library class or class template, or
35
  - a deduction guide for any standard library class template.
36
 
37
  A program may explicitly instantiate a class template defined in the
38
+ standard library only if the declaration
39
+
40
+ - depends on the name of at least one program-defined type, and
41
+ - the instantiation meets the standard library requirements for the
42
+ original template.
43
 
44
  Let `F` denote a standard library function [[global.functions]], a
45
  standard library static member function, or an instantiation of a
46
  standard library function template. Unless `F` is designated an
47
  *addressable function*, the behavior of a C++ program is unspecified
 
57
  ill-formed) if it attempts to form a reference to `F` or if it attempts
58
  to form a pointer-to-member designating either a standard library
59
  non-static member function [[member.functions]] or an instantiation of a
60
  standard library member function template.
61
 
62
+ Let `F` denote a standard library function or function template. Unless
63
+ `F` is designated an addressable function, it is unspecified if or how a
64
+ reflection value designating the associated entity can be formed.
65
+
66
+ [*Note 3*: For example, it is possible that `std::meta::members_of`
67
+ will not return reflections of standard library functions that an
68
+ implementation handles through an extra-linguistic
69
+ mechanism. — *end note*]
70
+
71
+ Let `C` denote a standard library class or class template
72
+ specialization. It is unspecified if or how a reflection value can be
73
+ formed to any private member of `C`, or what the names of such members
74
+ may be.
75
+
76
  A translation unit shall not declare namespace `std` to be an inline
77
  namespace [[namespace.def]].
78
 
79
  ##### Namespace `posix` <a id="namespace.posix">[[namespace.posix]]</a>
80
 
81
  The behavior of a C++ program is undefined if it adds declarations or
82
  definitions to namespace `posix` or to a namespace within namespace
83
  `posix` unless otherwise specified. The namespace `posix` is reserved
84
+ for use by \IsoPosixUndated and other POSIX standards.
85
 
86
  ##### Namespaces for future standardization <a id="namespace.future">[[namespace.future]]</a>
87
 
88
  Top-level namespaces whose *namespace-name* consists of `std` followed
89
  by one or more *digit*s [[lex.name]] are reserved for future