bcraig added a comment. I like the warning that you generate for min and max macros existing. Is the push_macro / pop_macro the right way to go though? You could throw extra parenthesis around the declaration and usages of min/max to avoid macro expansion.
#define add(x,y) (x)-(y) template <typename T> T (add)(T x, T y) // parens around add to suppress macro { return x+y; } int main() { return (add)(5, 4) + // uses function add(5, 4); // uses macro } https://reviews.llvm.org/D33080 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits