Copy ConstructibleDescriptionA type is Copy Constructible if it is possible to copy objects of that type. Notation
DefinitionsValid expressions
Models
Concept Checking Classtemplate <class T> struct CopyConstructibleConcept { void constraints() { T a(b); // require copy constructor T* ptr = &a; // require address of operator const_constraints(a); ignore_unused_variable_warning(ptr); } void const_constraints(const T& a) { T c(a); // require const copy constructor const T* ptr = &a; // require const address of operator ignore_unused_variable_warning(c); ignore_unused_variable_warning(ptr); } T b; }; See alsoDefault
Constructible and Assignable Revised 05 December, 2006
Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) |