This is what the C++ Standard says
A template argument for a non-type, non-template template-parameter shall be on of
- an integral const expr of integral or enum type
- name of non-type template parameter
- name of object or function with external linkage
- addr of object of function with external linkae
A string literal is not acceptable template-argument because a string literal has internal linkage
Amit
Main Topics
Browse All Topics





by: chance7Posted on 2004-05-13 at 02:51:04ID: 11057517
That is not allowed. Read the reasons and examples from the link below.
.com/techt alk/templa tes/ #strin gliteral
http://www.comeaucomputing
Regards,
chance