From 3bbc493fc1de03cddec9496431203e4be2d5f61d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jaakko=20J=C3=A4rvi?=
Date: Fri, 31 Aug 2001 14:50:06 +0000
Subject: [PATCH] Corrected/refined the requirement for a tuple element type
[SVN r10975]
---
doc/tuple_users_guide.html | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/doc/tuple_users_guide.html b/doc/tuple_users_guide.html
index 87f2983..4d0d4eb 100644
--- a/doc/tuple_users_guide.html
+++ b/doc/tuple_users_guide.html
@@ -75,13 +75,22 @@ Both tuple_io.hpp
and tuple_comparison.hpp
include CopyConstructible [C++ Standard 20.1.3]. (To be precise, CopyConstrucible is an unnecessary strong requirement for a valid element type, as the operator&
is not used by the library.)
+
+
+
+Examples of types that are not allowed as tuple elements:
- classes that do not have a public copy constructor
+- classes, where the copy constructor takes its argument as a non-const reference (cf.
auto_ptr
)
- arrays
-However, a reference to a non-copyable type is a valid element type.
+
+Note that a reference to any of these non-copyable types is a valid element
+type.
For example, the following definitions are valid tuple instantiations (A
, B
and C
are some user defined classes):