Is there a way to pseudonize a static member function in C ++? I would like to be able to cover it, so that I do not need to fully qualify the name.
Essentially something like:
struct Foo {
static void bar() {}
};
using baz = Foo::bar;
void test() { baz(); }
My first thought was to use std::bind(as in auto baz = std::bind(Foo::bar);) or function pointers (as in auto baz = Foo::bar;), but this is unsatisfactory, because for each function I want to be able to use an alias in, I need to make a separate variable only for this function or instead make an alias variable available in global / static area.
source
share