2.0 KiB
[concept.copyconstructible]
18 Concepts library [concepts]
18.4 Language-related concepts [concepts.lang]
18.4.14 Concept copy_constructible [concept.copyconstructible]
template<class T> concept [copy_constructible](#concept:copy_constructible "18.4.14 Concept copy_constructible [concept.copyconstructible]") = [move_constructible](concept.moveconstructible#concept:move_constructible "18.4.13 Concept move_constructible [concept.moveconstructible]")<T> && [constructible_from](concept.constructible#concept:constructible_from "18.4.11 Concept constructible_from [concept.constructible]")<T, T&> && [convertible_to](concept.convertible#concept:convertible_to "18.4.4 Concept convertible_to [concept.convertible]")<T&, T> && [constructible_from](concept.constructible#concept:constructible_from "18.4.11 Concept constructible_from [concept.constructible]")<T, const T&> && [convertible_to](concept.convertible#concept:convertible_to "18.4.4 Concept convertible_to [concept.convertible]")<const T&, T> && [constructible_from](concept.constructible#concept:constructible_from "18.4.11 Concept constructible_from [concept.constructible]")<T, const T> && [convertible_to](concept.convertible#concept:convertible_to "18.4.4 Concept convertible_to [concept.convertible]")<const T, T>;
If T is an object type, then let v be an lvalue of typeT or const T or an rvalue of type const T.
T models copy_constructible only if
-
After the definition T u = v;,u is equal to v ([concepts.equality]) andv is not modified.
-
T(v) is equal to v and does not modify v.