From Jason Turner

[meta.unary]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmpsqosjhpe/{from.md → to.md} +14 -6
tmp/tmpsqosjhpe/{from.md → to.md} RENAMED
@@ -1,9 +1,11 @@
1
  ### Unary type traits <a id="meta.unary">[[meta.unary]]</a>
2
 
3
- This subclause contains templates that may be used to query the
4
- properties of a type at compile time.
 
 
5
 
6
  Each of these templates shall be a *Cpp17UnaryTypeTrait* [[meta.rqmts]]
7
  with a base characteristic of `true_type` if the corresponding condition
8
  is `true`, otherwise `false_type`.
9
 
@@ -41,17 +43,23 @@ template specialization may result in the implicit instantiation of the
41
  template argument if and only if the semantics of `X` require that the
42
  argument is a complete type.
43
 
44
  For the purpose of defining the templates in this subclause, a function
45
  call expression `declval<T>()` for any type `T` is considered to be a
46
- trivial ([[basic.types]], [[special]]) function call that is not an
47
- odr-use [[basic.def.odr]] of `declval` in the context of the
48
  corresponding definition notwithstanding the restrictions of 
49
  [[declval]].
50
 
51
- [*Note 1*: A union is a class type that can be marked with
52
- `final`. *end note*]
 
 
 
 
 
 
53
 
54
  [*Example 1*:
55
 
56
  ``` cpp
57
  is_const_v<const volatile int> // true
 
1
  ### Unary type traits <a id="meta.unary">[[meta.unary]]</a>
2
 
3
+ #### General <a id="meta.unary.general">[[meta.unary.general]]</a>
4
+
5
+ Subclause [[meta.unary]] contains templates that may be used to query
6
+ the properties of a type at compile time.
7
 
8
  Each of these templates shall be a *Cpp17UnaryTypeTrait* [[meta.rqmts]]
9
  with a base characteristic of `true_type` if the corresponding condition
10
  is `true`, otherwise `false_type`.
11
 
 
43
  template argument if and only if the semantics of `X` require that the
44
  argument is a complete type.
45
 
46
  For the purpose of defining the templates in this subclause, a function
47
  call expression `declval<T>()` for any type `T` is considered to be a
48
+ trivial [[term.trivial.type]], [[special]] function call that is not an
49
+ odr-use [[term.odr.use]] of `declval` in the context of the
50
  corresponding definition notwithstanding the restrictions of 
51
  [[declval]].
52
 
53
+ For the purpose of defining the templates in this subclause, let
54
+ `VAL<T>` for some type `T` be an expression defined as follows:
55
+
56
+ - If `T` is a reference or function type, `VAL<T>` is an expression with
57
+ the same type and value category as `declval<T>()`.
58
+ - Otherwise, `VAL<T>` is a prvalue that initially has type `T`.
59
+ \[*Note 1*: If `T` is cv-qualified, the cv-qualification is subject to
60
+ adjustment [[expr.type]]. — *end note*]
61
 
62
  [*Example 1*:
63
 
64
  ``` cpp
65
  is_const_v<const volatile int> // true