#include using namespace std; template class Point{ public: Point(double time, T value):time(time),value(value){} double time; T value; }; template class StepFunction{ public: StepFunction(){} vector > points; void addPoint(Point p); }; template void StepFunction::addPoint(Point p){ vector >::iterator it; for(it = points.begin(); it != points.end() && (*it).getTime()(p)); } /*template <> void StepFunction::addPoint(Point p){ vector >::iterator it; for(it = points.begin(); it != points.end() && (*it).time(p)); } */ int main(int argc, char **argv){ StepFunction sf; sf.addPoint(Point(0,5)); }