Possible Duplicate:
What do # and ## operators do in C?
I can’t seem to word the proper google query for this question so I’ll decided to ask you wonderful people.
I’ve seen # being used in macro definitions, but what the hell does it mean?
Reference: http://www.flipcode.com/archives/Faking_Templates_In_C.shtml
That begs a secondary question, are templates in C++ implemented using macros?
Read the GCC documentation on the
cpppreprocessor. The#sign is used for stringification of macro arguments, and the double##for concatenationC++ templates are not implemented as preprocessor textual macros. You might feel them as being macros producing abstract syntax trees (of some core subset of C++).
FYI, Common Lisp has an even more powerful macro system.