I'm looking at my copy (the 4e) and I can't find any mention of this on page 725. I expect that you have the fourth edition too, thanks to mention of nullptr. With that in mind, I checked the errata (at http://www.stroustrup.com/4th_printing3.html ) and found nothing relevant.
Various text searches (I have a PDF copy) similarly yield nothing. In particular, grepping for Vec<string> yields exactly one result: Vec<string> c22; // default_value is string{}; that is, ""
Where exactly does the issue appear? What book do you have?
You can use at least the following types as template non-type parameters [1, 2]:
- std::nullptr_t
- integral type;
- lvalue reference type (to object or to function);
- pointer type (to object or to function);
- pointer to member type (to member object or to member function);
- enumeration type.
String literals are not usable as template non-type arguments[3, 4]:; not even lvalue expressions with linkage satisfying LiteralType[4] are allowed[1]
Evidence: http://coliru.stacked-crooked.com/a/9c72d6ed409a49e1
because string literals have no linkage - there is no name to link. In my copy of the book, this example is given (pp. 724):
It seems like Stroustrup forgot that string literals are unusable in the context of a template non-type argument, or that behavior changed late during the standardization process.
Some: I have Vec<string,"fortytwo"> c2; and Vec<string,""> c2; and Vec<string> c22;
And those are the only errors I spot. The strange thing is that Stroustrup mentions this exact thing is disallowed right before making the error. Perhaps someone else should check me on this.