Language
C++
Compiler
clang 8.0.0
Options
Warnings
Boost 1.70.0
C++17
no pedantic
Raw compiler options
a.cpp
$ clang++ prog.cc -Wall -Wextra -I/opt/wandbox/boost-1.70.0/clang-8.0.0/include -std=c++17 a.cpp
Johnny
Exit Code:
0
Author
anonymous
almost 6 years ago
C++
clang 8.0.0
Author
anonymous
almost 6 years ago
$ clang++ prog.cc -Wall -Wextra -I/opt/wandbox/boost-1.70.0/clang-8.0.0/include -std=c++17 a.cpp
prog.cc:6:29: warning: instantiation of variable 'A<double>::name' required here, but no definition is available [-Wundefined-var-template]
std::cout << A<double>::name << std::endl;
^
./a.h:7:28: note: forward declaration of template entity is here
static const char *name;
^
prog.cc:6:29: note: add an explicit instantiation declaration to suppress this warning if 'A<double>::name' is explicitly instantiated in another translation unit
std::cout << A<double>::name << std::endl;
^
1 warning generated.
Johnny