diff options
author | Jonathan Wakely <jwakely@redhat.com> | 2016-10-13 09:55:40 +0100 |
---|---|---|
committer | Jonathan Wakely <redi@gcc.gnu.org> | 2016-10-13 09:55:40 +0100 |
commit | 3e0c9334e9f766749d1661745b320860ae4827ef (patch) | |
tree | de65450242299903cce5c67fcf15cc1599d140d7 /libstdc++-v3/include | |
parent | 92c5266bbd5378a5513f43edf23b1394621675a3 (diff) | |
download | gcc-3e0c9334e9f766749d1661745b320860ae4827ef.zip gcc-3e0c9334e9f766749d1661745b320860ae4827ef.tar.gz gcc-3e0c9334e9f766749d1661745b320860ae4827ef.tar.bz2 |
Fix exception-specification of std::invoke
* include/bits/invoke.h (__invoke): Fix exception-specification.
* include/std/functional (invoke): Likewise.
* testsuite/20_util/function_objects/invoke/1.cc: New test.
From-SVN: r241089
Diffstat (limited to 'libstdc++-v3/include')
-rw-r--r-- | libstdc++-v3/include/bits/invoke.h | 2 | ||||
-rw-r--r-- | libstdc++-v3/include/std/functional | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/libstdc++-v3/include/bits/invoke.h b/libstdc++-v3/include/bits/invoke.h index 60405b5..2bbdab7 100644 --- a/libstdc++-v3/include/bits/invoke.h +++ b/libstdc++-v3/include/bits/invoke.h @@ -87,7 +87,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION template<typename _Callable, typename... _Args> constexpr typename result_of<_Callable&&(_Args&&...)>::type __invoke(_Callable&& __fn, _Args&&... __args) - noexcept(__is_nothrow_callable<_Callable(_Args&&...)>::value) + noexcept(__is_nothrow_callable<_Callable&&(_Args&&...)>::value) { using __result_of = result_of<_Callable&&(_Args&&...)>; using __type = typename __result_of::type; diff --git a/libstdc++-v3/include/std/functional b/libstdc++-v3/include/std/functional index 2587392..6a45314 100644 --- a/libstdc++-v3/include/std/functional +++ b/libstdc++-v3/include/std/functional @@ -200,7 +200,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION template<typename _Callable, typename... _Args> inline result_of_t<_Callable&&(_Args&&...)> invoke(_Callable&& __fn, _Args&&... __args) - noexcept(is_nothrow_callable_v<_Callable(_Args&&...)>) + noexcept(is_nothrow_callable_v<_Callable&&(_Args&&...)>) { return std::__invoke(std::forward<_Callable>(__fn), std::forward<_Args>(__args)...); |