This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Explicit specialization problem
- From: Yogesh Kini <kini1982 at postmaster dot co dot uk>
- To: gcc-help at gcc dot gnu dot org
- Date: Fri, 26 Nov 2004 06:19:58 +0000
- Subject: Explicit specialization problem
- Reply-to: kini1982 at postmaster dot co dot uk
Hi,
When I compile the below code using gcc 3.3 I get the errors as below.
But MS VC++ compiles it straight. Can any one please tell me what the problem is?
Thanks,
Yogesh
namespace xyz
{
template<class A, class B, class C>
class ABC
{
template<bool T>
struct M
{
float a,b,c;
};
template<>
struct M<true> -> Error here
{
int i,j,k;
};
};
};
main.cpp:59: error: enclosing class templates are not explicitly specialized
main.cpp:61: error: template parameters not used in partial specialization:
main.cpp:61: error: `A'
main.cpp:61: error: `B'
main.cpp:61: error: `C'
___________________________________________________
Meet other people who share your interests.
http://www.homemaster.net - Homemaster. Come Together. Online.