   comparison function arguments when using std::set
  Hi, I've thought of a better way to do what I was doing now but it's annoying me that I can't remember how to specify the comparison function in a std::set which takes more than two arguments.std::set<graphics::light_point, graphics::light_comparison> sortedlights(lights_.begin(), lights_.end());where light_comparison is declared as:bool light_comparison(const light_point& l1, const light_point& l2, const D3DXVECTOR3& viewerPosition) const;So what should I use in the definition of sortedlights to make it correct?   
  If you want to create a set that stores a data argument to sort the set by, you can use a comparison function object with state as the second template argument. Ex:struct Comparator {  Comparator(int arg) : data(arg) {}  int data;  bool operator()(const Object & lhs, const Object & rhs) {    return my_comparison(lhs, rhs, data);  }};std::set<Object, Comparator> s(Comparator(0));;  Thanks, just what I was after :)   