From Jason Turner

[expos.only.entity]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmpapkifa8m/{from.md → to.md} +17 -8
tmp/tmpapkifa8m/{from.md → to.md} RENAMED
@@ -1,24 +1,23 @@
1
  #### Exposition-only entities, etc. <a id="expos.only.entity">[[expos.only.entity]]</a>
2
 
3
- Several entities and *typedef-name*s defined in [[support]] through
4
- [[thread]] and [[depr]] are only defined for the purpose of exposition.
5
- The declaration of such an entity or *typedef-name* is followed by a
6
- comment ending in *exposition only*.
7
 
8
  The following are defined for exposition only to aid in the
9
  specification of the library:
10
 
11
  ``` cpp
12
  namespace std {
13
  template<class T>
14
  requires convertible_to<T, decay_t<T>>
15
- constexpr decay_t<T> decay-copy(T&& v)
16
- noexcept(is_nothrow_convertible_v<T, decay_t<T>>) // exposition only
17
  { return std::forward<T>(v); }
18
 
19
- constexpr auto synth-three-way =
20
  []<class T, class U>(const T& t, const U& u)
21
  requires requires {
22
  { t < u } -> boolean-testable;
23
  { u < t } -> boolean-testable;
24
  }
@@ -31,9 +30,19 @@ namespace std {
31
  return weak_ordering::equivalent;
32
  }
33
  };
34
 
35
  template<class T, class U = T>
36
- using synth-three-way-result = decltype(synth-three-way(declval<T&>(), declval<U&>()));
 
37
  }
38
  ```
39
 
 
 
 
 
 
 
 
 
 
 
1
  #### Exposition-only entities, etc. <a id="expos.only.entity">[[expos.only.entity]]</a>
2
 
3
+ Several entities defined in [[support]] through [[exec]] and [[depr]]
4
+ are only defined for the purpose of exposition. The declaration of such
5
+ an entity is followed by a comment ending in *exposition only*.
 
6
 
7
  The following are defined for exposition only to aid in the
8
  specification of the library:
9
 
10
  ``` cpp
11
  namespace std {
12
  template<class T>
13
  requires convertible_to<T, decay_t<T>>
14
+ constexpr decay_t<T> decay-copy(T&& v) // exposition only
15
+ noexcept(is_nothrow_convertible_v<T, decay_t<T>>)
16
  { return std::forward<T>(v); }
17
 
18
+ constexpr auto synth-three-way = // exposition only
19
  []<class T, class U>(const T& t, const U& u)
20
  requires requires {
21
  { t < u } -> boolean-testable;
22
  { u < t } -> boolean-testable;
23
  }
 
30
  return weak_ordering::equivalent;
31
  }
32
  };
33
 
34
  template<class T, class U = T>
35
+ using synth-three-way-result = // exposition only
36
+ decltype(synth-three-way(declval<T&>(), declval<U&>()));
37
  }
38
  ```
39
 
40
+ An object `dst` is said to be *decay-copied from* a subexpression `src`
41
+ if the type of `dst` is
42
+
43
+ ``` cpp
44
+ decay_t<decltype((src))>
45
+ ```
46
+
47
+ and `dst` is copy-initialized from `src`.
48
+