From 9bcb72e0b001525a25370716da57a1d48a8922f4 Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Tue, 4 Nov 2014 02:49:27 +0000 Subject: [PATCH] * include/std/functional (_Bind_simple): Simplify construction. From-SVN: r217065 --- libstdc++-v3/ChangeLog | 2 ++ libstdc++-v3/include/std/functional | 15 +++------------ 2 files changed, 5 insertions(+), 12 deletions(-) diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 88e93524d2b..c8e2ef28365 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -4,6 +4,8 @@ * include/experimental/optional (__constexpr_addressof): Likewise. (_Optional_base, optional, make_optional): Likewise. + * include/std/functional (_Bind_simple): Simplify construction. + 2014-11-03 Paolo Carlini * include/parallel/algo.h: Do not use default arguments in function diff --git a/libstdc++-v3/include/std/functional b/libstdc++-v3/include/std/functional index f615ae4ea67..f8e9b54fd91 100644 --- a/libstdc++-v3/include/std/functional +++ b/libstdc++-v3/include/std/functional @@ -1582,18 +1582,10 @@ _GLIBCXX_HAS_NESTED_TYPE(result_type) { typedef typename result_of<_Callable(_Args...)>::type result_type; - template::type> + template explicit - _Bind_simple(const _Callable& __callable, _Args2&&... __args) - : _M_bound(__callable, std::forward<_Args2>(__args)...) - { } - - template::type> - explicit - _Bind_simple(_Callable&& __callable, _Args2&&... __args) - : _M_bound(std::move(__callable), std::forward<_Args2>(__args)...) + _Bind_simple(_Tp&& __f, _Up&&... __args) + : _M_bound(std::forward<_Tp>(__f), std::forward<_Up>(__args)...) { } _Bind_simple(const _Bind_simple&) = default; @@ -1607,7 +1599,6 @@ _GLIBCXX_HAS_NESTED_TYPE(result_type) } private: - template typename result_of<_Callable(_Args...)>::type _M_invoke(_Index_tuple<_Indices...>) -- 2.30.2