Original Post
I'm having template issues. I have a Profile class which stores ordered pairs of double (time) and T (Matrix/double/int/bool/Quaternion/etc). I have a host of other functions that are working, but the following two (and slight variations on these two) arent working. I get a "error C2660: 'std::list<_Ty>::sort' : function does not take 1 arguments" when I try and call the function pmin, and the same with merge when I try to call it. HOWEVER, I don't get any errors when I dont try and call the functions. What gives? Code as follows. template class Profile { private: list> data; public: friend const T pmin(const Profile& profIn) { Profile temp = profIn; temp.data.sort(profValLesser); return temp.data.front().second; } friend const Profile mergeProfiles(const Profile& prof1, const Profile& prof2) { Profile newProf; newProf.data.merge(prof1.data, profTimeLesser); newProf.data.merge(prof2.data, profTimeLesser); return newProf; } }