summaryrefslogtreecommitdiffstats
path: root/libstdc++-v3/include/std/thread
diff options
context:
space:
mode:
authorredi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>2010-10-08 00:44:12 +0000
committerredi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>2010-10-08 00:44:12 +0000
commit7746395bf4adaf161ab72b1111efc21f938e587b (patch)
tree223378819d65a4a1a8fd8097258e549d4a14ed6f /libstdc++-v3/include/std/thread
parent888a3210cd1aa01e0e845e2802561e7138340313 (diff)
downloadppe42-gcc-7746395bf4adaf161ab72b1111efc21f938e587b.tar.gz
ppe42-gcc-7746395bf4adaf161ab72b1111efc21f938e587b.zip
2010-10-08 Jonathan Wakely <jwakely.gcc@gmail.com>
PR libstdc++/45893 * include/std/functional (bind): Implement DR 817 and add support for volatile-qualified call wrappers. * include/std/mutex (call_once): Implement DR 891. * include/std/thread (thread::thread): Implement DR 929. * include/std/future: Optimise use of std::bind. * testsuite/20_util/bind/cv_quals.cc: Test volatile-qualification. * testsuite/20_util/bind/move.cc: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@165144 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/include/std/thread')
-rw-r--r--libstdc++-v3/include/std/thread14
1 files changed, 6 insertions, 8 deletions
diff --git a/libstdc++-v3/include/std/thread b/libstdc++-v3/include/std/thread
index d5bbf6e0146..4a3818e7278 100644
--- a/libstdc++-v3/include/std/thread
+++ b/libstdc++-v3/include/std/thread
@@ -126,16 +126,14 @@ namespace std
thread(thread&& __t)
{ swap(__t); }
- template<typename _Callable>
- explicit thread(_Callable __f)
- {
- _M_start_thread(_M_make_routine<_Callable>
- (std::forward<_Callable>(__f)));
- }
-
template<typename _Callable, typename... _Args>
+ explicit
thread(_Callable&& __f, _Args&&... __args)
- { _M_start_thread(_M_make_routine(std::bind(__f, __args...))); }
+ {
+ _M_start_thread(_M_make_routine(std::bind<void>(
+ std::forward<_Callable>(__f),
+ std::forward<_Args>(__args)...)));
+ }
~thread()
{
OpenPOWER on IntegriCloud