Get the latest tech news

Dependent Names with a Little Encouragement


With A Little Encouragement Hey, fuckface! Think fast! template<typename F> void invokeFoo(F& f) { f.foo(); } struct Fooable { void foo() {} }; int main() { Fooable c; invokeFoo(c); } This is normal C++ code—nothing particularly nefarious afoot. invokeFoo is a function that takes a hopefully-fooable argument and, well, calls its foo method.

None

Get the Android app

Or read this on Hacker News

Read more on:

Photo of little encouragement

little encouragement

Photo of dependent names

dependent names