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++/33959] [4.1/4.2/4.3 Regression] ICE in instantiate_class_template, at cp/pt.c:6649



------- Comment #7 from cppljevans at suddenlink dot net  2007-11-01 21:38 -------
Please ignore 1st attachment.  I selected auto-detect thinking it would 
auto-detect it as text/plain.

When #define INST_GT, the friend operator>> is instantiated and this give
the ice.  OTOH, when #undef INST_GT, apparently the fried operator>> is not
instantiated and compiler gives:

main-pt-c-ice.cpp:68: error: no match for 'operator>>' in 'a_arg >> a_arg'

So maybe the compiler is right about having to instantiate enclosing class.
Maybe what I really need is a templated namespace, as mentioned here:

http://groups.google.com/group/comp.std.c++/browse_thread/thread/4baec3f90675a166/6eb713e7bb143b09?lnk=gst&q=namespace+template#6eb713e7bb143b09


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33959


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