Hacker News new | ask | show | jobs
by cbsmith 1293 days ago
Yeah, UFCS remains illusive, but tantalizingly close. It's pretty easy to make

``` struct foo { void bar(); }

bar(foo* i) { assert(i != nullptr); i->bar(); } ```

work, but there's enough syntactic complexity in the language that it isn't as easy as it should be.

1 comments

It's a 1-liner with std::mem_fn
Indeed.