473,396 Members | 2,013 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

FATAL Internal Error - Visual C++ DOTNET 2003

Hi
I am trying to do the following

template <class X>
class CA
{
public:
X m_a;
X m_b;
X Get(X& a,X& b)
{
m_a = a;
m_b = b;
}
};
template <class X>
class CB
{
class CA<X>;
public:
X m_a;
X m_b;
X Get(X& a,X& b)
{
m_a = a;
m_b = b;
}
};

when I try to compile I get a fatal internal error c2001
on the line that declares class CA<X> inside the class
CB.
the help suggests to disable optimizations. But these
are disabled anyway.
Any help would really be appreciated.
thanks
jac
Nov 17 '05 #1
3 2700
"Jacob Bensabat" <jb*******@ewre.com> wrote in message
news:01****************************@phx.gbl...
Hi
I am trying to do the following

template <class X>
class CA
{
public:
X m_a;
X m_b;
X Get(X& a,X& b)
{
m_a = a;
m_b = b;
}
};
template <class X>
class CB
{
class CA<X>;
I think the following syntax is used to forward declare:

template <class X_> class CA;

Maybe that causes the internal compiler error.
public:
X m_a;
X m_b;
X Get(X& a,X& b)
{
m_a = a;
m_b = b;
}
};

when I try to compile I get a fatal internal error c2001
on the line that declares class CA<X> inside the class
CB.
the help suggests to disable optimizations. But these
are disabled anyway.
Any help would really be appreciated.
thanks
jac


Tom.
Nov 17 '05 #2
Jacob,

FWIW, the Whidbey compiler doesn't suffer from the ICE :)

At this line:
class CA<X>;


it reports:

error C2906: 'CA<X>' : explicit specialization requires 'template <>'
and
error C2908: explicit specialization; 'CA<X>' has already been
instantiated

If you make the code:

template class CA<X>;

it'll compile ok.

Dave
--
MVP VC++ FAQ: http://www.mvps.org/vcfaq
Nov 17 '05 #3
Hi
thanks
David's solution did the job
jac.

Nov 17 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Raziel? | last post by:
Greetings, When Installing Visual Studio .NET the following error occurs: Internal Error 25300 I've tried setup in safemode and the same error occurs. The disk is brand new and clean.
0
by: JimmyS | last post by:
I am getting this error .. c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\stl_alloc.h(305) : fatal error C1001: INTERNAL COMPILER ERROR (compiler file 'msc1.cpp', line 2701)...
1
by: Irakli Lomidze | last post by:
Internal Compiler Error VS.NET 2003 Enterprise Architect Windowx XP SP1 RAM 1GB Free DiskSpacs 20GB
9
by: Marco Nova | last post by:
Hello I'm using the latest version of Visual Studio 2003 version 7.1.3088, .net framework 1.1.4322 and I've some problem compiling a project, it give me the error ...
10
by: PufferFish | last post by:
Hi folks, I hope that this is the correct group for these things, apologies if not. I've got a strange compiler error. It appears to be similar to the issue described in knowledgebase...
4
by: cgparis | last post by:
Dear forum members, I am trying to compile C++ code under MS Visual Studio .NET 2003, which references the latest Xerces C++ release library (2.6.0). This Xerces release was made available...
2
by: Itjalve | last post by:
This gives me a fatal error. I'm using .NET VC7.1 and made a win32 consol app, I have no problems with VC6. Debug build. I have removed nearly all my code this is whats left. From the beginning...
8
by: Rod | last post by:
I have been working with ASP.NET 1.1 for quite a while now. For some reason, opening some ASP.NET applications we wrote is producing the following error message: "The Web server reported...
1
by: BobPitbull | last post by:
When doing a "Whole Program Optimization" release build, I get the following error during LINK:- Searching \main\Binaries\lib\pc_retail\AAALibs.lib: LINK : fatal error LNK1000: Internal error...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.