Basically I have class B, that in the constructor is creating two class A objects. One class A object is being sent a pointer to the function lessThan, and other is sent a pointer to gearterThan.
I have tried lots of different approaches, but am not understanding where I am going wrong with function pointers.
First, an outline of the approach below:
1. have a template baseclass that overloads operators < and > and then define the lessThan() and greaterThan() template functions with this base class objects
2. declare a type for a function pointer that takes 2 objects of the template base class and returns bool through the using declaration (see below)
3. then proceed to declare custom template types A and B as in your example (though I have a feeling that with the above background we could move to B directly without going through A)
here's the code though you might have to tinker with it a bit to make it fit your exact specifications that have not been sent through: