public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/41568] New: ADL being kinky
@ 2009-10-04 15:01 c2841847 at tyldd dot com
2009-10-05 10:35 ` [Bug c++/41568] " redi at gcc dot gnu dot org
2009-11-15 17:23 ` [Bug c++/41568] [C++0x] " paolo dot carlini at oracle dot com
0 siblings, 2 replies; 3+ messages in thread
From: c2841847 at tyldd dot com @ 2009-10-04 15:01 UTC (permalink / raw)
To: gcc-bugs
Consider
#include <list>
//...
std::list<int> i,i2;
swap(move(i),move(i2));
This code should compile fine. Unfortunately it does not compile on gcc 4.4.1.
Error message:
xxx:xx: error: no matching function for call to 'swap(std::list<int,
std::allocator<int> >, std::list<int, std::allocator<int> >)'
c:\program files
(x86)\mingw\bin\../lib/gcc/mingw32/4.4.1/include/c++/thread:202: note:
candidates are: void std::swap(std::thread&, std::thread&&)
c:\program files
(x86)\mingw\bin\../lib/gcc/mingw32/4.4.1/include/c++/thread:198: note:
void std::swap(std::thread&&, std::thread&)
c:\program files
(x86)\mingw\bin\../lib/gcc/mingw32/4.4.1/include/c++/thread:194: note:
void std::swap(std::thread&, std::thread&)
c:\program files
(x86)\mingw\bin\../lib/gcc/mingw32/4.4.1/include/c++/bits/stl_list.h:1527:
note: void std::swap(std::list<_Tp, _Alloc>&, std::list<_Tp,
_Alloc>&&) [with _Tp = int, _Alloc = std::allocator<int>]
c:\program files
(x86)\mingw\bin\../lib/gcc/mingw32/4.4.1/include/c++/bits/stl_list.h:1522:
note: void std::swap(std::list<_Tp, _Alloc>&&, std::list<_Tp,
_Alloc>&) [with _Tp = int, _Alloc = std::allocator<int>]
c:\program files
(x86)\mingw\bin\../lib/gcc/mingw32/4.4.1/include/c++/bits/stl_list.h:1516:
note: void std::swap(std::list<_Tp, _Alloc>&, std::list<_Tp,
_Alloc>&) [with _Tp = int, _Alloc = std::allocator<int>]
c:\program files
(x86)\mingw\bin\../lib/gcc/mingw32/4.4.1/include/c++/bits/move.h:76: note:
void std::swap(_Tp&, _Tp&) [with _Tp = std::list<int,
std::allocator<int> >]
--
Summary: ADL being kinky
Product: gcc
Version: 4.4.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: c2841847 at tyldd dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41568
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug c++/41568] ADL being kinky
2009-10-04 15:01 [Bug c++/41568] New: ADL being kinky c2841847 at tyldd dot com
@ 2009-10-05 10:35 ` redi at gcc dot gnu dot org
2009-11-15 17:23 ` [Bug c++/41568] [C++0x] " paolo dot carlini at oracle dot com
1 sibling, 0 replies; 3+ messages in thread
From: redi at gcc dot gnu dot org @ 2009-10-05 10:35 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from redi at gcc dot gnu dot org 2009-10-05 10:34 -------
The code should not compile, swapping of rvalues is no longer supported in the
C++0x draft.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41568
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug c++/41568] [C++0x] ADL being kinky
2009-10-04 15:01 [Bug c++/41568] New: ADL being kinky c2841847 at tyldd dot com
2009-10-05 10:35 ` [Bug c++/41568] " redi at gcc dot gnu dot org
@ 2009-11-15 17:23 ` paolo dot carlini at oracle dot com
1 sibling, 0 replies; 3+ messages in thread
From: paolo dot carlini at oracle dot com @ 2009-11-15 17:23 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from paolo dot carlini at oracle dot com 2009-11-15 17:23 -------
For the record, even before San Francisco, rvalue-rvalue swaps were prohibited.
--
paolo dot carlini at oracle dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
Summary|ADL being kinky |[C++0x] ADL being kinky
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41568
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-11-15 17:23 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-10-04 15:01 [Bug c++/41568] New: ADL being kinky c2841847 at tyldd dot com
2009-10-05 10:35 ` [Bug c++/41568] " redi at gcc dot gnu dot org
2009-11-15 17:23 ` [Bug c++/41568] [C++0x] " paolo dot carlini at oracle dot com
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).