struct LuminaireProbability
{
//luminaire as an intersectable
Intersectable *mIntersectable;
//material of the intersectable
Material *mMaterial;
//probability of choosing the luminaire
float mLuminaireProbabilityValue;
};
The third parameter of std::sort is supposed to be a functor, an object which has defined the operator().
Either write an object which defines the operator() taking two LuminaireProbability objects and returns based on the comparison, or define the operator< for LuminaireProbability and only pass the first two parameters.
If you need to be able to dynamically choose a different comparison you'll want a functor, but it's easier to define operator<.
Complier does not know how to compare object of your struct since you don't define any function or operator for this.
You should overload the operator< for your objects as @BlackSheep mentioned. This way your compiler would know that you wish your objects to be compared accoriding to their mLuminaireProbabilityValue value and not some other value.
This operator would just return 0 or 1 as a result of the comparison.