jeudi 1 octobre 2015

Does C++ 11 support template class reflection?

I know a little knowledge about C++ 11 template. My intention is to have a template function as shown below:

template<class T>
void function(T * a) {
  if (T belongs to class M) {
    a->function_m();
  } else {
    a->function_o();
  }
}

Does C++ 11 support this template class reflection?

Aucun commentaire:

Enregistrer un commentaire