lundi 8 août 2016

c++ alternative member definition

In C++ you can define members the following way:

struct test {
    using memberType = int(int);
    /*virtual*/ memberType member;
};

int test::member(int x) { return x; }

With C++14 is there any way to define the member inside the class definition, for instance with a lambda ?

Aucun commentaire:

Enregistrer un commentaire