Files
cppdraft_translate/cppdraft/concept/moveconstructible.md
2025-10-25 03:02:53 +03:00

1.4 KiB
Raw Permalink Blame History

[concept.moveconstructible]

18 Concepts library [concepts]

18.4.13 Concept move_constructible [concept.moveconstructible]

🔗

template<class T> concept [move_constructible](#concept:move_constructible "18.4.13Concept move_­constructible[concept.moveconstructible]") = [constructible_from](concept.constructible#concept:constructible_from "18.4.11Concept constructible_­from[concept.constructible]")<T, T> && [convertible_to](concept.convertible#concept:convertible_to "18.4.4Concept convertible_­to[concept.convertible]")<T, T>;

1

#

If T is an object type, then let rv be an rvalue of typeT and u2 a distinct object of type T equal torv.

T models move_constructible only if

  • (1.1)

    After the definition T u = rv;, u is equal to u2.

  • (1.2)

    T(rv) is equal to u2.

  • (1.3)

    If T is not const, rv's resulting state is valid but unspecified ([lib.types.movedfrom]); otherwise, it is unchanged.