This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/37043] fails to find operator match when constructing object on the fly
- From: "scott at stg dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 7 Aug 2008 13:53:54 -0000
- Subject: [Bug c++/37043] fails to find operator match when constructing object on the fly
- References: <bug-37043-16567@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #3 from scott at stg dot net 2008-08-07 13:53 -------
For clarification, this code compiles & runs in gcc & msvc:
FooBar test1("one");
"A">>test1;
And this code compiles & runs fine in msvc, but gives compile error in gcc:
"B">>FooBar("two");
Since it's the same class, why should there be any difference in matching
operator>> depending on how it's instantiated?
The sample code is a distillation (demonstration) from a larger code base for
convenience of exploring this issue.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37043