[Bug c++/37043] fails to find operator match when constructing object on the fly
scott at stg dot net
gcc-bugzilla@gcc.gnu.org
Thu Aug 7 13:32:00 GMT 2008
------- Comment #2 from scott at stg dot net 2008-08-07 13:31 -------
Okay, so if I change:
FooBar& operator>> (const char *s,FooBar& dest)
to
FooBar operator>> (const char *s,FooBar dest)
It now compiles on both msvc and g++, but required functionality (operation
affecting existing object, not making new copy of it) is lost.
Is there some reason that using a reference to rvalue in operator>> is
disallowed in gcc and not msvc? If so, why doesn't it fail in the A>>object;
instance where the object has already been instantiated separately?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37043
More information about the Gcc-bugs
mailing list