prog.cpp: In function 'int main()':
prog.cpp:27:8: error: the value of '{anonymous}::namespace_const_message' is not usable in a constant expression
print<namespace_const_message>();
^
prog.cpp:11:12: note: '{anonymous}::namespace_const_message' was not declared 'constexpr'
const char namespace_const_message[] = "Anonymous Namespace Const Message";
^
prog.cpp:28:8: error: the value of 'const_message' is not usable in a constant expression
print<const_message>();
^
prog.cpp:16:12: note: 'const_message' was not declared 'constexpr'
const char const_message[] = "Const Message";
^
prog.cpp:29:19: error: no matching function for call to 'print()'
print<"Literal">();
^
prog.cpp:29:19: note: candidate is:
prog.cpp:3:38: note: template<const char* MESSAGE> void print()
template <const char * MESSAGE> void print()
^
prog.cpp:3:38: note: template argument deduction/substitution failed:
prog.cpp:29:19: error: '"Literal"' is not a valid template argument for type 'const char*' because string literals can never be used in this context
print<"Literal">();
^