Hello, I was wondering if anyone out there in Boost land could give me a hand here? Here's the problem: I have a class A: class A { public: A(int i) : _priority(i) {} int priority() {return _priority;} private: int _priority; }; What I want to do is create a std::priority_queue based on boost::shared_ptr<A> and use boost::bind/compose to create the sorting function required by std::priority_queue. However, when I try and typedef the queue (to save a lot of typing) I get compiler errors on VS.NET. using namespace std; using namespace boost; typedef priority_queue<shared_ptr<Functor>, vector<shared_ptr<Functor> >, bind(less<int(), bind(&Functor::priority, _1), bind(&Functor::priority, _2))> MyQueue; Am I going about this the right way? Any help appreciated. TIA Mark.
participants (1)
-
Mark Snelling