Is there any difference between following 2 syntax:
template<int N> struct A; // (1)
and
template<const int N> struct A; // (2)
Any general guideline for when to use each syntax ?
No.
§14.1 [temp.param] p5
[...] The top-level cv-qualifiers on the template-parameter are ignored when determining its type.
2.1m questions
2.1m answers
60 comments
57.0k users