https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77477
--- Comment #5 from Jonathan Wakely <redi at gcc dot gnu.org> --- (In reply to Jim Michaels from comment #2) > I don't believe this answer. > to my knowledge the syntax is OK for c++11. Please stop claiming templates don't work and learn to write C++. > I was even told once that <S> is not needed, which was wrong. > you did not state exactly what was wrong, only that "your code is wrong." > please be explicit like you require your bug reporters to be. thank you. Remove all occurrences of <S> and str:: from your example code and it will be valid C++.