This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/37043] fails to find operator match when constructing object on the fly



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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]