|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r79860 - sandbox/type_erasure/boost/type_erasure
From: steven_at_[hidden]
Date: 2012-08-03 16:00:57
Author: steven_watanabe
Date: 2012-08-03 16:00:56 EDT (Fri, 03 Aug 2012)
New Revision: 79860
URL: http://svn.boost.org/trac/boost/changeset/79860
Log:
Update call docs
Text files modified:
sandbox/type_erasure/boost/type_erasure/call.hpp | 34 +++++++++++++++++++++-------------
1 files changed, 21 insertions(+), 13 deletions(-)
Modified: sandbox/type_erasure/boost/type_erasure/call.hpp
==============================================================================
--- sandbox/type_erasure/boost/type_erasure/call.hpp (original)
+++ sandbox/type_erasure/boost/type_erasure/call.hpp 2012-08-03 16:00:56 EDT (Fri, 03 Aug 2012)
@@ -99,31 +99,39 @@
/**
* Dispatches a type erased function.
*
+ * @c Op must be a primitive concept which is present in
+ * @c Concept. Its signature determines how the arguments of
+ * @ref call are handled. If the argument is a @ref placeholder,
+ * @ref call expects an @ref any using that @ref placeholder.
+ * This @ref any is unwrapped by @ref call. The type that
+ * it stores must be the same type specified by @c binding.
+ * Any arguments that are not placeholders in the signature
+ * of @c Op are passed through unchanged.
+ *
* If @c binding is not specified, it will be deduced from
* the arguments. Naturally this requires at least one
- * argument to be an @ref any.
+ * argument to be an @ref any. In this case, all @ref any
+ * arguments must have the same @ref binding.
*
- * @c Op must be a primitive concept which is present in
- * @c Concept. Its signature determines how the arguments of
- * call are handled. All the arguments that are placeholders
- * in the signature are unwrapped. The types that they hold
- * must match the types specified by @c binding. The other
- * arguments will be passed through unchanged.
+ * \return The result of the operation. If the result type
+ * of the signature of @c Op is a placeholder, the
+ * result will be converted to the appropriate @ref
+ * any type.
*
- * \return The result of the operation. If the
- * result type is a placeholder, the result will be
- * converted to the appropriate @ref any type.
+ * \throws bad_function_call if @ref relaxed_match is
+ * in @c Concept and there is a type mismatch.
*
* Example:
*
* @code
- * typedef addable<_a, int, _b> concept;
+ * typedef mpl::vector<
+ * copy_constructible<_b>,
+ * addable<_a, int, _b> > concept;
* any<concept, _a> a = ...;
- * any<concept, _b> b(call(concept(), a, 10));
+ * any<concept, _b> b(call(addable<_a, int, _b>(), a, 10));
* @endcode
*
* The signature of @ref addable is <code>_b(const _a&, const int&)</code>
- * FIXME: This won't compile for lack of copy_constructible.
*/
template<class Concept, class Op, class... U>
typename ::boost::type_erasure::detail::call_impl<Sig, U..., Concept>::type
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