With gcc 4.6, I get the following error:
graphs.cpp: In function 'int main()': graphs.cpp:9:15: error: '<::' cannot begin a template-argument list [-fpermissive] graphs.cpp:9:15: note: '<:' is an alternate spelling for '['. Insert whitespace between '<' and '::' graphs.cpp:9:15: note: (if you use '-fpermissive' G++ will accept your code)
So, -permission is the way to go. [EDIT: now I see that you added that you already found this]
Otherwise, since you mentioned that the sources were generated automatically, you can add a post-processing step. For example, using sed
sed -i 's,<::,< ::,g' filename.cpp
or something like that, for example. python. But only if you are sure that you never use <:: for anything else.
source share