How to simulate a partial specialization of selected member functions based on a template parameter that is an STL container?
问题 I am working with a class that uses STL containers as a template parameter. Not all containers provide the same methods though, so I am trying to figure out how I can specialise specific methods based on the container used. Example: template<typename container> class A { private: container m_container; public: void foo(); // does something container specific // more generic methods that work with any container }; The following code doexsn't compile saying "Can't match method specialisation",