N
Noah Roberts
template < bool b >
struct whatnot
{
template < typename T>
void call();
};
template < typename T >
struct fun()
{
bool const what = a_metafunction<T>::value;
whatnot<what>::call<T>();
// or....
// whatnot<what>::template call<T>();
}
MSVC accepts either. Which is correct? What has me confused is that
"what" is not a dependent name, but on the other hand it's a constant
expression that IS dependent. If what was a type I'd be certain the
second expression should be used.
struct whatnot
{
template < typename T>
void call();
};
template < typename T >
struct fun()
{
bool const what = a_metafunction<T>::value;
whatnot<what>::call<T>();
// or....
// whatnot<what>::template call<T>();
}
MSVC accepts either. Which is correct? What has me confused is that
"what" is not a dependent name, but on the other hand it's a constant
expression that IS dependent. If what was a type I'd be certain the
second expression should be used.