Static member of specialized template initialisation

Static member of specialized template initialisation

Portrait de ericch1

Hi,

can't compile this with ICC (but works with g++):

Any idea why? Is it an ICC limitation?

Thanks,

Eric
----------------------------------
//Non-Template class...
class ValuesNT {
static const int scInts[];
};

//Initialisation works....
const int ValuesNT::scInts[] = { 99, 47, 33};

//But Template class...
template
class Values {
};

// with Specialized template class...
template <>
class Values {
static const int scInts[];
};

//Won't compile??? (it does with gcc 2.95.3/3.2.1)
template <>
const int Values::scInts[] = { 99, 47, 33};


int main() { Values v; }

------------------------------------------

1 contribution / 0 nouveau(x)
Reportez-vous à notre Notice d'optimisation pour plus d'informations sur les choix et l'optimisation des performances dans les produits logiciels Intel.