December 14, 2002 Static integral constants can't be used in template specialization | ||||
---|---|---|---|---|
| ||||
template<bool b>
struct A
{ };
template<>
struct A<true>
{
static const int value = 0;
};
struct B
{
static const bool value = true;
};
int main()
{
return A<B::value>::value;
// Error: 'value' is not a member of struct 'A<1>'
}
DM doesn't choose the template specialization A<true>.
bye, Christof
--
http://cmeerw.org JID: cmeerw@jabber.at mailto cmeerw at web.de
...and what have you contributed to the Net?
|
Copyright © 1999-2021 by the D Language Foundation