diff options
Diffstat (limited to 'gcc-4.8/libstdc++-v3/include/std')
-rw-r--r-- | gcc-4.8/libstdc++-v3/include/std/functional | 11 | ||||
-rw-r--r-- | gcc-4.8/libstdc++-v3/include/std/future | 19 | ||||
-rw-r--r-- | gcc-4.8/libstdc++-v3/include/std/iostream | 6 | ||||
-rw-r--r-- | gcc-4.8/libstdc++-v3/include/std/tuple | 4 |
4 files changed, 26 insertions, 14 deletions
diff --git a/gcc-4.8/libstdc++-v3/include/std/functional b/gcc-4.8/libstdc++-v3/include/std/functional index 64b6dae04..b31a33b0b 100644 --- a/gcc-4.8/libstdc++-v3/include/std/functional +++ b/gcc-4.8/libstdc++-v3/include/std/functional @@ -2181,8 +2181,15 @@ _GLIBCXX_HAS_NESTED_TYPE(result_type) using _Invoke = decltype(__callable_functor(std::declval<_Functor&>()) (std::declval<_ArgTypes>()...) ); + // Used so the return type convertibility checks aren't done when + // performing overload resolution for copy construction/assignment. + template<typename _Tp> + using _NotSelf = __not_<is_same<_Tp, function>>; + template<typename _Functor> - using _Callable = __check_func_return_type<_Invoke<_Functor>, _Res>; + using _Callable + = __and_<_NotSelf<_Functor>, + __check_func_return_type<_Invoke<_Functor>, _Res>>; template<typename _Cond, typename _Tp> using _Requires = typename enable_if<_Cond::value, _Tp>::type; @@ -2323,7 +2330,7 @@ _GLIBCXX_HAS_NESTED_TYPE(result_type) * reference_wrapper<F>, this function will not throw. */ template<typename _Functor> - _Requires<_Callable<_Functor>, function&> + _Requires<_Callable<typename decay<_Functor>::type>, function&> operator=(_Functor&& __f) { function(std::forward<_Functor>(__f)).swap(*this); diff --git a/gcc-4.8/libstdc++-v3/include/std/future b/gcc-4.8/libstdc++-v3/include/std/future index 30100fe05..3b15fd8bc 100644 --- a/gcc-4.8/libstdc++-v3/include/std/future +++ b/gcc-4.8/libstdc++-v3/include/std/future @@ -1261,8 +1261,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION struct __future_base::_Task_state<_Fn, _Alloc, _Res(_Args...)> final : __future_base::_Task_state_base<_Res(_Args...)> { - _Task_state(_Fn&& __fn, const _Alloc& __a) - : _Task_state_base<_Res(_Args...)>(__a), _M_impl(std::move(__fn), __a) + template<typename _Fn2> + _Task_state(_Fn2&& __fn, const _Alloc& __a) + : _Task_state_base<_Res(_Args...)>(__a), + _M_impl(std::forward<_Fn2>(__fn), __a) { } private: @@ -1292,8 +1294,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION struct _Impl : _Alloc { - _Impl(_Fn&& __fn, const _Alloc& __a) - : _Alloc(__a), _M_fn(std::move(__fn)) { } + template<typename _Fn2> + _Impl(_Fn2&& __fn, const _Alloc& __a) + : _Alloc(__a), _M_fn(std::forward<_Fn2>(__fn)) { } _Fn _M_fn; } _M_impl; }; @@ -1302,8 +1305,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION static shared_ptr<__future_base::_Task_state_base<_Signature>> __create_task_state(_Fn&& __fn, const _Alloc& __a) { - typedef __future_base::_Task_state<_Fn, _Alloc, _Signature> _State; - return std::allocate_shared<_State>(__a, std::move(__fn), __a); + typedef typename decay<_Fn>::type _Fn2; + typedef __future_base::_Task_state<_Fn2, _Alloc, _Signature> _State; + return std::allocate_shared<_State>(__a, std::forward<_Fn>(__fn), __a); } template<typename _Fn, typename _Alloc, typename _Res, typename... _Args> @@ -1344,7 +1348,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION __constrain_pkgdtask<packaged_task, _Fn>::__type> explicit packaged_task(_Fn&& __fn) - : packaged_task(allocator_arg, std::allocator<int>(), std::move(__fn)) + : packaged_task(allocator_arg, std::allocator<int>(), + std::forward<_Fn>(__fn)) { } // _GLIBCXX_RESOLVE_LIB_DEFECTS diff --git a/gcc-4.8/libstdc++-v3/include/std/iostream b/gcc-4.8/libstdc++-v3/include/std/iostream index 7864749a7..0c3019e07 100644 --- a/gcc-4.8/libstdc++-v3/include/std/iostream +++ b/gcc-4.8/libstdc++-v3/include/std/iostream @@ -48,13 +48,13 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * * The <iostream> header declares the eight <em>standard stream * objects</em>. For other declarations, see - * http://gcc.gnu.org/onlinedocs/libstdc++/manual/bk01pt11ch24.html + * http://gcc.gnu.org/onlinedocs/libstdc++/manual/io.html * and the @link iosfwd I/O forward declarations @endlink * * They are required by default to cooperate with the global C * library's @c FILE streams, and to be available during program - * startup and termination. For more information, see the HOWTO - * linked to above. + * startup and termination. For more information, see the section of the + * manual linked to above. */ //@{ extern istream cin; /// Linked to standard input diff --git a/gcc-4.8/libstdc++-v3/include/std/tuple b/gcc-4.8/libstdc++-v3/include/std/tuple index ee2b2e1d4..9ab30e514 100644 --- a/gcc-4.8/libstdc++-v3/include/std/tuple +++ b/gcc-4.8/libstdc++-v3/include/std/tuple @@ -755,14 +755,14 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION typename tuple_element<__i, tuple<_Elements...>>::type >::type get(tuple<_Elements...>& __t) noexcept - { return __get_helper<__i>(__t); } + { return std::__get_helper<__i>(__t); } template<std::size_t __i, typename... _Elements> constexpr typename __add_c_ref< typename tuple_element<__i, tuple<_Elements...>>::type >::type get(const tuple<_Elements...>& __t) noexcept - { return __get_helper<__i>(__t); } + { return std::__get_helper<__i>(__t); } template<std::size_t __i, typename... _Elements> constexpr typename __add_r_ref< |