diff options
author | Sze Howe Koh <szehowe.koh@gmail.com> | 2013-10-25 22:23:30 +0800 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-10-28 12:05:22 +0100 |
commit | 3567f4c2fc9ee45898ed9a0784051d4fa64897e2 (patch) | |
tree | a5c0cec9d926531d4c5e36539bfcd94558251f0f /src/concurrent/qtconcurrentfilter.cpp | |
parent | eb921e6edc3906ac90e8155f063b6c71df6386be (diff) |
Doc: Update boost::bind()/std::tr1::bind() to std::bind()
boost::bind() became part of the C++11 standard with minor
modifications. Present the standard version as the main one to use, but
list the others as alternatives.
Change-Id: If419d8d24c0925119d3b9f7ff76be44981351bc0
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Diffstat (limited to 'src/concurrent/qtconcurrentfilter.cpp')
-rw-r--r-- | src/concurrent/qtconcurrentfilter.cpp | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/src/concurrent/qtconcurrentfilter.cpp b/src/concurrent/qtconcurrentfilter.cpp index 22a1243c18..a58c52edc1 100644 --- a/src/concurrent/qtconcurrentfilter.cpp +++ b/src/concurrent/qtconcurrentfilter.cpp @@ -155,15 +155,11 @@ \section2 Using Bound Function Arguments - Note that Qt does not provide support for bound functions. This is - provided by 3rd party libraries like - \l{http://www.boost.org/libs/bind/bind.html}{Boost} or - \l{http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1836.pdf} - {C++ TR1 Library Extensions}. - If you want to use a filter function takes more than one argument, you can - use boost::bind() or std::tr1::bind() to transform it onto a function that - takes one argument. + use std::bind() to transform it onto a function that takes one argument. If + C++11 support is not available, \l{http://www.boost.org/libs/bind/bind.html} + {boost::bind()} or \l{http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1836.pdf} + {std::tr1::bind()} are suitable replacements. As an example, we use QString::contains(): @@ -177,7 +173,7 @@ \snippet code/src_concurrent_qtconcurrentfilter.cpp 10 - The return value from boost::bind() is a function object (functor) with + The return value from std::bind() is a function object (functor) with the following signature: \snippet code/src_concurrent_qtconcurrentfilter.cpp 11 |