Skip to content

Instantly share code, notes, and snippets.

@OneSadCookie
Created January 3, 2012 21:34
Show Gist options
  • Save OneSadCookie/1557050 to your computer and use it in GitHub Desktop.
Save OneSadCookie/1557050 to your computer and use it in GitHub Desktop.
preproc-fu
#define cat(x, y) x##y
#define A B
#define C(Foo) cat(Foo, Bar)
C(A)
clang -E foo2.h
# 1 "foo2.h"
# 1 "foo2.h" 1
# 1 "<built-in>" 1
# 1 "<built-in>" 3
# 143 "<built-in>" 3
# 1 "<command line>" 1
# 1 "<built-in>" 2
# 1 "foo2.h" 2
BBar
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment