Author
anonymous
over 7 years ago
Language
Compiler
Options
Author
anonymous
over 7 years ago
$ prog.cc:9:18: warning: instantiation of variable 'Foo<int>::bar' required here, but no definition is available [-Wundefined-var-template]
cout<<Foo<int>::bar;
^
./test.h:5:16: note: forward declaration of template entity is here
static int bar;
^
prog.cc:9:18: note: add an explicit instantiation declaration to suppress this warning if 'Foo<int>::bar' is explicitly instantiated in another translation unit
cout<<Foo<int>::bar;
^
1 warning generated.
123
Exit Code:
0