|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r83252 - sandbox/type_erasure/boost/type_erasure
From: steven_at_[hidden]
Date: 2013-03-02 14:58:43
Author: steven_watanabe
Date: 2013-03-02 14:58:42 EST (Sat, 02 Mar 2013)
New Revision: 83252
URL: http://svn.boost.org/trac/boost/changeset/83252
Log:
More complete description of relaxed.
Text files modified:
sandbox/type_erasure/boost/type_erasure/relaxed.hpp | 27 +++++++++++++++------------
1 files changed, 15 insertions(+), 12 deletions(-)
Modified: sandbox/type_erasure/boost/type_erasure/relaxed.hpp
==============================================================================
--- sandbox/type_erasure/boost/type_erasure/relaxed.hpp (original)
+++ sandbox/type_erasure/boost/type_erasure/relaxed.hpp 2013-03-02 14:58:42 EST (Sat, 02 Mar 2013)
@@ -43,24 +43,27 @@
}
/**
- * This special concept does not have any behavior by
- * itself. However it affects the behavior of other
- * concepts. In the presence of this concept, the
- * requirement that all the arguments to a function
- * must match is relaxed. Instead, if there is a
- * reasonable default implementation, it will be used,
- * otherwise a @ref bad_function_call exception will
- * be thrown.
+ * This special concept enables various useful default behavior that
+ * makes @ref any act like an ordinary object. By default @ref any
+ * forwards all operations to the underlying type, and provides only
+ * the operations that are specified in its @c Concept.
*
- * The following concepts have special behavior with
- * this flag:
- * - @ref assignable "assignable": If the types are not the same,
- * it will fall back on copy and swap.
+ * In detail, @ref relaxed enables the following:
+ * - A raw value can be assigned to an @ref any. This will replace
+ * the value stored by the @ref any. (But note that if @ref assignable
+ * is present, it takes priority.)
+ * - copy assignment of @ref any uses the copy constructor if it can't
+ * use @ref assignable (either because @ref assignable is missing,
+ * or because the stored types do not match).
+ * - default construction of @ref any is allowed and creates a null any.
* - @ref equality_comparable "equality_comparable": If the types do not
* match, it will return false.
* - @ref less_than_comparable "less_than_comparable": If the types do not
* match, the ordering will be according to
* @c std::type_info::before.
+ * - if the arguments to any other function do not match, it will throw
+ * a @ref bad_function_call exception instead of having undefined
+ * behavior.
*/
struct relaxed : ::boost::mpl::vector0<> {};
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk