ICE providing constructor for class derived from templated base

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
Just drop D::

Jim McGrath said:
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.
 
Jim,

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

Dave
 
Thanks! Sometimes I just can't see the obvious...

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

Just drop D:

in messag
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top