[Bug c++/24139] Forward declaration of class in template class

2005-10-01 Thread redi at gcc dot gnu dot org
--- Additional Comments From redi at gcc dot gnu dot org 2005-10-01 14:52 --- This is a revised version, which should compile but doesn't: #include using namespace std; template class Hide { public: Hide(); class Hidden; private: Hidden *a; }; template<> class Hide::Hidden

[Bug c++/24139] Forward declaration of class in template class

2005-10-01 Thread redi at gcc dot gnu dot org
--- Additional Comments From redi at gcc dot gnu dot org 2005-10-01 14:41 --- 14.7.3/5 "Definitions of members of an explicitly specialized class are defined in the same manner as member of normal classes, and not using the explicit specialization syntax." -- http://gcc.gnu.org/bugz

[Bug c++/24139] Forward declaration of class in template class

2005-10-01 Thread redi at gcc dot gnu dot org
--- Additional Comments From redi at gcc dot gnu dot org 2005-10-01 14:18 --- Matthew has a point about "Hidden" being confusing in the diagnostic, as Hidden is not a template. I notice if you define the Hidden constructor inline in the Hide::Hidden class body then it works (with Comeau

[Bug c++/24139] Forward declaration of class in template class

2005-09-30 Thread pinskia at gcc dot gnu dot org
--- Additional Comments From pinskia at gcc dot gnu dot org 2005-09-30 11:54 --- Comeau C++ also rejects this: "ComeauTest.c", line 9: error: incomplete type is not allowed a=new Hidden(); ^ "ComeauTest.c", line 26: error: "Hide::Hidden::Hidden()" is not an e

[Bug c++/24139] Forward declaration of class in template class

2005-09-30 Thread mspencer at ndsuk dot com
--- Additional Comments From mspencer at ndsuk dot com 2005-09-30 11:43 --- *** Bug 24143 has been marked as a duplicate of this bug. *** -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24139