I just recently started working with c++ templates in order to use a template I know you do
template<typename T> class MyClass, but how do I apply a filter? In C# you can do
public class MyClass<T> where T:filterClass and in Java it's
public class MyClass<T extends/implements filterClass>. I've tried following the tutorial at http://ift.tt/2oL6ZP5 but my compiler doesn't recognize the flag -clr or the keywords generic and where. I've looked on cppreference.com and cplusplus.com and couldn't find anything. Using the --version option on my compiler returns g++ (Ubuntu 5.4.0-6ubuntu~16.04.1) 5.4.0 20160609. I am also using c++11 and would prefer not to use external libraries.
mercredi 5 avril 2017
C++ Template Filter
Inscription à :
Publier les commentaires (Atom)
Aucun commentaire:
Enregistrer un commentaire