This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] libstdc++/68276 and libstdc++68995 qualification in <functional>


On 21/12/15 13:02 +0000, Jonathan Wakely wrote:
Two patches to add missing std:: qualification to prevent ADL
problems. Both are regressions, 68276 only on trunk, but 68995 has
been broken since 4.8.0 (but only affects people mixing TR1 with
C++11, and I was already rude about them in Bugzilla so won't do it
again here ;-)

For the branches I added a better test for 68995, this extends the
test on trunk to match what's on the branches now.

Tested x86_64-linux, committed to trunk.
commit 574125855cb79becc19ed564040a0ca1b23ebabc
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Tue Jan 12 19:19:02 2016 +0000

    Extend std::function test for PR 68995
    
    	* testsuite/20_util/function/68995.cc: Test reference_wrapper cases.

diff --git a/libstdc++-v3/testsuite/20_util/function/68995.cc b/libstdc++-v3/testsuite/20_util/function/68995.cc
index 78712d6..5690657 100644
--- a/libstdc++-v3/testsuite/20_util/function/68995.cc
+++ b/libstdc++-v3/testsuite/20_util/function/68995.cc
@@ -25,3 +25,8 @@
 std::tr1::shared_ptr<int> test() { return {}; }
 
 std::function<std::tr1::shared_ptr<int>()> func = test;
+std::function<std::tr1::shared_ptr<int>()> funcr = std::ref(test);
+
+void test2(std::tr1::shared_ptr<int>) { }
+
+std::function<void(std::tr1::shared_ptr<int>)> func2 = std::ref(test2);

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]