472,804 Members | 1,594 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,804 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 2655
"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...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 2 August 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: erikbower65 | last post by:
Using CodiumAI's pr-agent is simple and powerful. Follow these steps: 1. Install CodiumAI CLI: Ensure Node.js is installed, then run 'npm install -g codiumai' in the terminal. 2. Connect to...
0
linyimin
by: linyimin | last post by:
Spring Startup Analyzer generates an interactive Spring application startup report that lets you understand what contributes to the application startup time and helps to optimize it. Support for...
0
by: erikbower65 | last post by:
Here's a concise step-by-step guide for manually installing IntelliJ IDEA: 1. Download: Visit the official JetBrains website and download the IntelliJ IDEA Community or Ultimate edition based on...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Sept 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: Taofi | last post by:
I try to insert a new record but the error message says the number of query names and destination fields are not the same This are my field names ID, Budgeted, Actual, Status and Differences ...
0
by: Rina0 | last post by:
I am looking for a Python code to find the longest common subsequence of two strings. I found this blog post that describes the length of longest common subsequence problem and provides a solution in...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
0
by: Mushico | last post by:
How to calculate date of retirement from date of birth

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.