------- 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