This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/33959] [4.1/4.2/4.3 Regression] ICE in instantiate_class_template, at cp/pt.c:6649
- From: "cppljevans at suddenlink dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 1 Nov 2007 21:38:19 -0000
- Subject: [Bug c++/33959] [4.1/4.2/4.3 Regression] ICE in instantiate_class_template, at cp/pt.c:6649
- References: <bug-33959-7390@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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