preprocessor: add an example of a macro that generates code

Change-Id: I902ebd73e039b8c3f44eca456be87809d1e1d3a4
Reviewed-by: hjk <qthjk@ovi.com>
This commit is contained in:
hjk
2012-05-15 17:39:13 +02:00
committed by hjk
parent 075153fc85
commit b13519d547
3 changed files with 11 additions and 0 deletions

View File

@@ -0,0 +1,2 @@
#define DECLARE_CLASS(s) class s
DECLARE_CLASS(QString);

View File

@@ -0,0 +1,7 @@
# 1 "data/macro_expand_1.cpp"
#gen true
# 1 "data/macro_expand_1.cpp"
class
#gen false
# 2 "data/macro_expand_1.cpp"
QString;