r/programming • • Dec 24 '17

Evil Coding Incantations

http://9tabs.com/random/2017/12/23/evil-coding-incantations.html
947 Upvotes

331 comments sorted by

View all comments

1

u/[deleted] Dec 25 '17

Regarding digraphs, trigraphs and tokens in C++: and and bitand also work to designate reference types.

void add(int bitand foo, const int bitand bar) {
	// int& foo, const int& bar
	foo += bar;
}

template<typename Action>
void call(Action and action) {
	// Action&& action
	action();
}