What am i doing wrong
- by Erik Sapir
I have the following code.
I need B class to have a min priority queue of AToTime objects.
AToTime have operator, and yet i receive error telling me than there is no operator matching the operands...
#include <queue>
#include <functional>
using namespace std;
class B{
//public functions
public:
B();
virtual ~B();
//private members
private:
log4cxx::LoggerPtr m_logger;
class AToTime
{
//public functions
public:
AToTime(const ACE_Time_Value& time, const APtr a) : m_time(time), m_a(a){}
bool operator >(const AToTime& other)
{
return m_time > other.m_time;
}
//public members - no point using any private members here
public:
ACE_Time_Value m_time;
APtr m_a;
};
priority_queue<AToTime, vector<AToTime>, greater<AToTime> > m_myMinHeap;
};