summaryrefslogtreecommitdiff
path: root/libstdc++-v3/include/backward/binders.h
diff options
context:
space:
mode:
authorlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>2011-11-30 05:16:36 +0000
committerlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>2011-11-30 05:16:36 +0000
commitbc4381667a31bd5f1e677d64c789b1e959df00d5 (patch)
treea6b80dca8f72a2e7640e4d535901e42325b2a954 /libstdc++-v3/include/backward/binders.h
parent1cd66bce1663eb648638d311b493de0dcc4146c3 (diff)
parent738c50b853f5ba0eaf93e23f6d29cbac761eef9e (diff)
downloadgcc-reload-v2a.tar.gz
Weekly merge from trunk. No regressions.reload-v2a
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/reload-v2a@181834 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/include/backward/binders.h')
-rw-r--r--libstdc++-v3/include/backward/binders.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/libstdc++-v3/include/backward/binders.h b/libstdc++-v3/include/backward/binders.h
index f98b56aaede..076f8d2e219 100644
--- a/libstdc++-v3/include/backward/binders.h
+++ b/libstdc++-v3/include/backward/binders.h
@@ -80,7 +80,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
*
* The type @c binder2nd and its creator function @c bind2nd do the same
* thing, but the stored argument is passed as the second parameter instead
- * of the first, e.g., @c bind2nd(std::minus<float>,1.3) will create a
+ * of the first, e.g., @c bind2nd(std::minus<float>(),1.3) will create a
* functor whose @c operator() accepts a floating-point number, subtracts
* 1.3 from it, and returns the result. (If @c bind1st had been used,
* the functor would perform <em>1.3 - x</em> instead.
@@ -89,10 +89,15 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
* calling algorithms. Their return values will be temporary objects.
* (The goal is to not require you to type names like
* @c std::binder1st<std::plus<int>> for declaring a variable to hold the
- * return value from @c bind1st(std::plus<int>,5).
+ * return value from @c bind1st(std::plus<int>(),5).
*
* These become more useful when combined with the composition functions.
*
+ * These functions are deprecated in C++11 and can be replaced by
+ * @c std::bind (or @c std::tr1::bind) which is more powerful and flexible,
+ * supporting functions with any number of arguments. Uses of @c bind1st
+ * can be replaced by @c std::bind(f, x, std::placeholders::_1) and
+ * @c bind2nd by @c std::bind(f, std::placeholders::_1, x).
* @{
*/
/// One of the @link binders binder functors@endlink.