473,326 Members | 2,175 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,326 software developers and data experts.

ICE providing constructor for class derived from templated base

Hi

Not sure if this is covered already - it looks similar but not identical to a couple of others mentioned here. I'm doing this because the derived class needs to take some parameters in it's constructor even though the example below does not do this. If anyone can think of a workaround, I'd love to hear it

// Causes internal compiler error in vc7.0 and vc7.

template< class B
struct D : public B

D::D( ) {
}

test2003.cpp(7) : fatal error C1001: INTERNAL COMPILER ERRO
(compiler file 'msc1.cpp', line 2701)

If you're going to email, please not the intentionally misspelled address

Nov 16 '05 #1
3 896
Just drop D::

"Jim McGrath" <ji*@speedtradinggroup.kom> wrote in message
news:82**********************************@microsof t.com...
Hi,

Not sure if this is covered already - it looks similar but not identical to a couple of others mentioned here. I'm doing this because the derived
class needs to take some parameters in it's constructor even though the
example below does not do this. If anyone can think of a workaround, I'd
love to hear it.
// Causes internal compiler error in vc7.0 and vc7.1

template< class B >
struct D : public B
{
D::D( ) {}
};

test2003.cpp(7) : fatal error C1001: INTERNAL COMPILER ERROR
(compiler file 'msc1.cpp', line 2701)

If you're going to email, please not the intentionally misspelled address.

Nov 16 '05 #2
Jim,

FWIW, this causes an ICE with the latest Widbey alpha compiler, so
I'll try to forward this to MS.

Dave
--
MVP VC++ FAQ: http://www.mvps.org/vcfaq
Nov 16 '05 #3
Thanks! Sometimes I just can't see the obvious...

----- Pent wrote: ----

Just drop D:

"Jim McGrath" wrote in messag
news:82**********************************@microsof t.com..
Hi
Not sure if this is covered already - it looks similar but not identica to a couple of others mentioned here. I'm doing this because the derive
class needs to take some parameters in it's constructor even though th
example below does not do this. If anyone can think of a workaround, I'
love to hear it // Causes internal compiler error in vc7.0 and vc7.
template< class B >> struct D : public


D::D( ) {
}
test2003.cpp(7) : fatal error C1001: INTERNAL COMPILER ERRO

(compiler file 'msc1.cpp', line 2701
If you're going to email, please not the intentionally misspelled address

Nov 16 '05 #4

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

Similar topics

3
by: tirath | last post by:
Hi all, I have a templated class that derives from a non-templated abstract class. How do I then cast a base class pointer to a <templated> derived class pointer in a generalised fashion? ...
1
by: FP | last post by:
I have a function that returns a base class pointer as in: baseClass<T>* FunctionA( ); As you can see the baseClass is templated. FunctionA is found in a third templated class. What I'm...
11
by: Nindi73 | last post by:
A few days a ago I posted my code for a deep copy pointer which doesn't require the pointee object to have a virtual copy constructor. I need help with checking that it was exception safe and...
11
by: Rahul | last post by:
Hi Everyone, While working with Java, i came across super() which passes values to base class constructor from derived class constructor. I was wondering if this could be implemented in c++ by...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.