prog.cpp:15:19: error: ‘" world"’ is not a valid template argument for type ‘const char*’ because string literals can never be used in this context
typedef A<" world"> B;
^
prog.cpp:17:25: error: ‘"!\012"’ is not a valid template argument for type ‘const char*’ because string literals can never be used in this context
class C : public A<"!\n"> {};
^
prog.cpp: In function ‘int main()’:
prog.cpp:20:11: error: ‘"hello"’ is not a valid template argument for type ‘const char*’ because string literals can never be used in this context
A<"hello"> a;
^
prog.cpp:23:4: error: request for member ‘foo’ in ‘a’, which is of non-class type ‘int’
a.foo();
^~~
prog.cpp:24:4: error: request for member ‘foo’ in ‘b’, which is of non-class type ‘B {aka int}’
b.foo();
^~~
prog.cpp:25:4: error: ‘class C’ has no member named ‘foo’
c.foo();
^~~