I have the following code with a bit of a "spaghetti" of templates:
template <typename A, typename B, typename... Args>
class C {
/*... */
Bar& getBar() { /* ... */ }
public:
template <typename U>
static void Foo() {
A a = getA<U>();
Baz& bar = getBar();
bar.frob<U>(a); /* @@@ */
}
/*... */
}
/* no template */
class D : public C<SomeA, D, const SomeE&> { /* ... */ }
/* no template */
class F : public D { /* ... */}
and when I try to compile a function with the following statement:
D::Foo<F>();
I get the error type name is not allowed
, on the line marked @@@
. Why would I be getting that? I know you get it when you try to call a function with a type name, but it doesn't look like I'm doing it here.