diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 44205c323b67..2fafca3b0dd5 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,5 +1,10 @@ 2016-01-12 Jonathan Wakely + PR libstdc++/68995 + * include/std/functional (_Function_handler::_M_invoke): Qualify + __callable_functor. + * testsuite/20_util/function/68995.cc: New. + PR libstdc++/69005 PR libstdc++/69222 * include/std/functional (function::_Invoke): Remove, use result_of. diff --git a/libstdc++-v3/include/std/functional b/libstdc++-v3/include/std/functional index 717d1bf18c83..cc40e4d8ec40 100644 --- a/libstdc++-v3/include/std/functional +++ b/libstdc++-v3/include/std/functional @@ -1883,7 +1883,7 @@ _GLIBCXX_MEM_FN_TRAITS(&&, false_type, true_type) static _Res _M_invoke(const _Any_data& __functor, _ArgTypes&&... __args) { - return __callable_functor(**_Base::_M_get_pointer(__functor))( + return std::__callable_functor(**_Base::_M_get_pointer(__functor))( std::forward<_ArgTypes>(__args)...); } }; @@ -1898,7 +1898,7 @@ _GLIBCXX_MEM_FN_TRAITS(&&, false_type, true_type) static void _M_invoke(const _Any_data& __functor, _ArgTypes&&... __args) { - __callable_functor(**_Base::_M_get_pointer(__functor))( + std::__callable_functor(**_Base::_M_get_pointer(__functor))( std::forward<_ArgTypes>(__args)...); } }; diff --git a/libstdc++-v3/testsuite/20_util/function/68995.cc b/libstdc++-v3/testsuite/20_util/function/68995.cc new file mode 100644 index 000000000000..75dafb4776bd --- /dev/null +++ b/libstdc++-v3/testsuite/20_util/function/68995.cc @@ -0,0 +1,32 @@ +// Copyright (C) 2015 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING3. If not see +// . + +// { dg-options "-std=gnu++11" } +// { dg-do compile } + +#include +#include +#include + +std::tr1::shared_ptr test() { return {}; } + +std::function()> func = test; +std::function()> funcr = std::ref(test); + +void test2(std::tr1::shared_ptr) { } + +std::function)> func2 = std::ref(test2);