lundi 27 mars 2017

How to disable a class member funrtion for certain template types

It seems to be simple, but I have some difficulties with the syntax of std::enable_if

The situation is actually quite simple.

a template class with template parameter T

2 functions which shall not be implemnted for one specific type of T.

Both functions have no parameters or return values of T One function accepts an int and the other function returns an int.

Any simple example ? Or is there another option (C++11) which does not use std::enable_if ?

Aucun commentaire:

Enregistrer un commentaire