This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/34666] c++0x: non-const method accepted for const&& object.
- From: "rguenth at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 4 Jan 2008 09:35:59 -0000
- Subject: [Bug c++/34666] c++0x: non-const method accepted for const&& object.
- References: <bug-34666-7667@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #3 from rguenth at gcc dot gnu dot org 2008-01-04 09:35 -------
Right. For the explicit instantiation
template class X<int>;
you get the error then:
t.C: In constructor 'X<T>::X(const X<T>&&) [with T = int]':
t.C:20: instantiated from here
t.C:6: error: passing 'const X<int>' as 'this' argument of 'int X<T>::f() [with
T = int]' discards qualifiers
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34666