Udostępnij przez


Błąd kompilatora C2770

nieprawidłowe jawne argumenty template_or_generic dla "szablonu"

Uwagi

Kandydaci szablonu funkcji z jawnym szablonem lub argumentami ogólnymi spowodowały niedozwolone typy funkcji.

Przykład

Poniższy przykład generuje kod C2770:

// C2770.cpp
#include <stdio.h>
template <class T>
int f(typename T::B*);   // expects type with member B

struct Err {};

int main() {
   f<int>(0);   // C2770 int has no B
   // try the following line instead
   f<OK>(0);
}