invoke-lite
invoke-lite copied to clipboard
A single-file header-only version of C++17-like invoke() for C++98, C++11 and later
Progress, [continuation of this comment in #1](https://github.com/martinmoene/invoke-lite/issues/1#issuecomment-942640155): - [x] Add tests - [ ] Add benchmarks - [ ] nonstd::invoke - [ ] nonstd::apply - [ ] std::invoke - [...
It would seem that this does the trick for C++11 onward: ``` template< typename F, typename ... Args > auto INVOKE(F&& fn, Args&& ... args) -> typename std::enable_if< std::is_member_pointer::value, decltype(std::mem_fn(fn)(std::forward(args)...))>::type...