public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
* [Bug libstdc++/47709] New: is_heap(standard iterator) becomes ambiguous in C++0x mode @ 2011-02-12 6:36 jyasskin at gcc dot gnu.org 2011-02-12 10:12 ` [Bug libstdc++/47709] " paolo.carlini at oracle dot com ` (3 more replies) 0 siblings, 4 replies; 5+ messages in thread From: jyasskin at gcc dot gnu.org @ 2011-02-12 6:36 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47709 Summary: is_heap(standard iterator) becomes ambiguous in C++0x mode Product: gcc Version: 4.6.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libstdc++ AssignedTo: unassigned@gcc.gnu.org ReportedBy: jyasskin@gcc.gnu.org $ cat test.cc #include <ext/algorithm> #include <vector> void foo() { std::vector<int> v; is_heap(v.begin(), v.end()); } $ g++-4.6svn -c test.cc $ g++-4.6svn -c test.cc -std=c++0x test.cc: In function ‘void foo()’: test.cc:6:29: error: call of overloaded ‘is_heap(std::vector<int>::iterator, std::vector<int>::iterator)’ is ambiguous test.cc:6:29: note: candidates are: include/c++/4.6.0/ext/algorithm:436:5: note: bool __gnu_cxx::is_heap(_RandomAccessIterator, _RandomAccessIterator) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<int*, std::vector<int> >] include/c++/4.6.0/bits/stl_heap.h:560:72: note: bool std::is_heap(_RAIter, _RAIter) [with _RAIter = __gnu_cxx::__normal_iterator<int*, std::vector<int> >] I believe the fix is to "using std::is_heap" into __gnu_cxx in C++0x mode rather than redefining it there. Another possible fix would be to move __normal_iterator out of __gnu_cxx to avoid ADL finding that is_heap, but that wouldn't help people who have already "using __gnu_cxx::is_heap" into their global namespaces. ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug libstdc++/47709] is_heap(standard iterator) becomes ambiguous in C++0x mode 2011-02-12 6:36 [Bug libstdc++/47709] New: is_heap(standard iterator) becomes ambiguous in C++0x mode jyasskin at gcc dot gnu.org @ 2011-02-12 10:12 ` paolo.carlini at oracle dot com 2011-02-12 21:27 ` paolo at gcc dot gnu.org ` (2 subsequent siblings) 3 siblings, 0 replies; 5+ messages in thread From: paolo.carlini at oracle dot com @ 2011-02-12 10:12 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47709 Paolo Carlini <paolo.carlini at oracle dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2011.02.12 10:05:02 AssignedTo|unassigned at gcc dot |paolo.carlini at oracle dot |gnu.org |com Target Milestone|--- |4.6.0 Ever Confirmed|0 |1 --- Comment #1 from Paolo Carlini <paolo.carlini at oracle dot com> 2011-02-12 10:05:02 UTC --- I'm going to implement your first suggestion. Note, however, frankly: the legacy ext/ stuff is really barely maintained, we are not going to deal systematically with this kind of issues, unless the fix turns out to be *really* trivial. ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug libstdc++/47709] is_heap(standard iterator) becomes ambiguous in C++0x mode 2011-02-12 6:36 [Bug libstdc++/47709] New: is_heap(standard iterator) becomes ambiguous in C++0x mode jyasskin at gcc dot gnu.org 2011-02-12 10:12 ` [Bug libstdc++/47709] " paolo.carlini at oracle dot com @ 2011-02-12 21:27 ` paolo at gcc dot gnu.org 2011-02-12 21:29 ` paolo.carlini at oracle dot com 2011-02-12 21:29 ` paolo at gcc dot gnu.org 3 siblings, 0 replies; 5+ messages in thread From: paolo at gcc dot gnu.org @ 2011-02-12 21:27 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47709 --- Comment #2 from paolo at gcc dot gnu.org <paolo at gcc dot gnu.org> 2011-02-12 21:26:24 UTC --- Author: paolo Date: Sat Feb 12 21:26:21 2011 New Revision: 170089 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=170089 Log: 2011-02-12 Paolo Carlini <paolo.carlini@oracle.com> PR libstdc++/47709 * include/ext/algorithm (is_heap): In C++0x mode import from namespace std. * testsuite/ext/is_heap/47709.cc: New. Added: trunk/libstdc++-v3/testsuite/ext/is_heap/47709.cc Modified: trunk/libstdc++-v3/ChangeLog trunk/libstdc++-v3/include/ext/algorithm ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug libstdc++/47709] is_heap(standard iterator) becomes ambiguous in C++0x mode 2011-02-12 6:36 [Bug libstdc++/47709] New: is_heap(standard iterator) becomes ambiguous in C++0x mode jyasskin at gcc dot gnu.org 2011-02-12 10:12 ` [Bug libstdc++/47709] " paolo.carlini at oracle dot com 2011-02-12 21:27 ` paolo at gcc dot gnu.org @ 2011-02-12 21:29 ` paolo.carlini at oracle dot com 2011-02-12 21:29 ` paolo at gcc dot gnu.org 3 siblings, 0 replies; 5+ messages in thread From: paolo.carlini at oracle dot com @ 2011-02-12 21:29 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47709 Paolo Carlini <paolo.carlini at oracle dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED Target Milestone|4.6.0 |4.5.3 --- Comment #4 from Paolo Carlini <paolo.carlini at oracle dot com> 2011-02-12 21:28:55 UTC --- Fixed mainline and 4_5-branch. ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug libstdc++/47709] is_heap(standard iterator) becomes ambiguous in C++0x mode 2011-02-12 6:36 [Bug libstdc++/47709] New: is_heap(standard iterator) becomes ambiguous in C++0x mode jyasskin at gcc dot gnu.org ` (2 preceding siblings ...) 2011-02-12 21:29 ` paolo.carlini at oracle dot com @ 2011-02-12 21:29 ` paolo at gcc dot gnu.org 3 siblings, 0 replies; 5+ messages in thread From: paolo at gcc dot gnu.org @ 2011-02-12 21:29 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47709 --- Comment #3 from paolo at gcc dot gnu.org <paolo at gcc dot gnu.org> 2011-02-12 21:27:00 UTC --- Author: paolo Date: Sat Feb 12 21:26:58 2011 New Revision: 170090 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=170090 Log: 2011-02-12 Paolo Carlini <paolo.carlini@oracle.com> PR libstdc++/47709 * include/ext/algorithm (is_heap): In C++0x mode import from namespace std. * testsuite/ext/is_heap/47709.cc: New. Added: branches/gcc-4_5-branch/libstdc++-v3/testsuite/ext/is_heap/47709.cc Modified: branches/gcc-4_5-branch/libstdc++-v3/ChangeLog branches/gcc-4_5-branch/libstdc++-v3/include/ext/algorithm ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2011-02-12 21:29 UTC | newest] Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2011-02-12 6:36 [Bug libstdc++/47709] New: is_heap(standard iterator) becomes ambiguous in C++0x mode jyasskin at gcc dot gnu.org 2011-02-12 10:12 ` [Bug libstdc++/47709] " paolo.carlini at oracle dot com 2011-02-12 21:27 ` paolo at gcc dot gnu.org 2011-02-12 21:29 ` paolo.carlini at oracle dot com 2011-02-12 21:29 ` paolo at gcc dot gnu.org
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).