From Jason Turner

[concept.copyconstructible]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmpt4gowb7u/{from.md → to.md} +19 -0
tmp/tmpt4gowb7u/{from.md → to.md} RENAMED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ### Concept <a id="concept.copyconstructible">[[concept.copyconstructible]]</a>
2
+
3
+ ``` cpp
4
+ template<class T>
5
+ concept copy_constructible =
6
+ move_constructible<T> &&
7
+ constructible_from<T, T&> && convertible_to<T&, T> &&
8
+ constructible_from<T, const T&> && convertible_to<const T&, T> &&
9
+ constructible_from<T, const T> && convertible_to<const T, T>;
10
+ ```
11
+
12
+ If `T` is an object type, then let `v` be an lvalue of type (possibly
13
+ `const`) `T` or an rvalue of type `const T`. `T` models
14
+ `copy_constructible` only if
15
+
16
+ - After the definition `T u = v;`, `u` is equal to `v`
17
+ [[concepts.equality]] and `v` is not modified.
18
+ - `T(v)` is equal to `v` and does not modify `v`.
19
+