Boost logo

Boost Users :

Subject: [Boost-users] [Container] ptr_set with user define compare function
From: ÁºÉÜ³Ø (shaochiliang_at_[hidden])
Date: 2009-05-22 02:11:26

I've defined a function object as below:

  struct BaseAddrLess : public std::binary_function<Base, Base, bool> {
        result_type operator() (const first_argument_type& lhs, const
second_argument_type& rhs) const {
              return &lhs < &rhs;

and use as a compare function in ptr_set like this:
   ptr_set<Base, BaseAddrLess> bset;

when the class Base is a abstract class the vc9 compiler will complain
  use of undefined type 'boost::result_of<F>'

What causes this problem? How to solve it?

Thank you for your patience to read my poor english.
S.C. Leung

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at