diff --git a/CopyConstructible.html b/CopyConstructible.html
index 8629642..4134f5e 100644
--- a/CopyConstructible.html
+++ b/CopyConstructible.html
@@ -170,6 +170,28 @@ denotes the address of u
std::pair
+Concept Checking Class
+
+
+ template <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 also
DefaultConstructible
diff --git a/iterator_adaptor_examples.cpp b/iterator_adaptor_examples.cpp
index aa0affb..c7baa08 100644
--- a/iterator_adaptor_examples.cpp
+++ b/iterator_adaptor_examples.cpp
@@ -7,7 +7,8 @@
#include
#include
#include
-#include
+#include
+#include
int
main(int, char*[])
@@ -15,6 +16,7 @@ main(int, char*[])
// This is a simple example of using the transform_iterators class to
// generate iterators that multiply the value returned by dereferencing
// the iterator. In this case we are multiplying by 2.
+ // Would be cooler to use lambda library in this example.
int x[] = { 1, 2, 3, 4, 5, 6, 7, 8 };