title: cannot call member function without object for vector of shared_ptr of object
body: <pre><code>#include &lt;boost/ref.hpp&gt;
  //#include &lt;boost/bind.hpp&gt;
  #include &lt;boost/shared_ptr.hpp&gt;
  #include &lt;boost/lambda/lambda.hpp&gt;
  #include &lt;boost/lambda/bind.hpp&gt;
  #include &lt;boost/mem_fn.hpp&gt;
  
  using namespace std;
  using namespace boost::lambda;
  
  class Base {
    public:
    Base () {}
    bool toBeRemoved() const {
      return true;
    }
  };
  
  class status : public Base {
    std::string name_;
    bool ok_;
  public:
    status(const std::string&amp; name):name_(name),ok_(true) {}
  
    void break_it() {
      ok_=false;
    }
  
    bool is_broken() const {
      return ok_;
    }
  
    void report() const {
      std::cout &lt;&lt; name_ &lt;&lt; " is " &lt;&lt;
        (ok_ ? "working nominally":"terribly broken") &lt;&lt; '\n';
    }
    std::string getStatus() const {
      return ok_ ? "1" : "0";
    }
  };
  
  class some_class {
   public:
   int test() {
     std::vector&lt;boost::shared_ptr&lt;status&gt; &gt; s_statuses = getStatus(); //some func 
     std::set&lt;string&gt; s;
     std::transform(s_statuses.begin(), s_statuses.end(), std::inserter(s, s.begin()), boost::lambda::bind(boost::mem_fn(&amp;status::getStatus), boost::ref(*_1)));
  
  // approach #2
  //   std::transform(s_statuses.begin(), s_statuses.end(), std::inserter(s, s.begin()), boost::lambda::bind(boost::mem_fn(&amp;status::getStatus), boost::ref(*_1), _1));
  
  // approach #3
  //   std::transform(s_statuses.begin(), s_statuses.end(), std::inserter(s, s.begin()), boost::bind(&amp;status::getStatus), _1));
  
     std::copy(s.begin(), s.end(), ostream_iterator&lt;string&gt;(std::cout, "-"));
     std::cout &lt;&lt; endl;
     return 0;
   }
  }
  </code></pre>
  
  <p>For all the approaches above, I am getting the error "can call member function without object" on the line containing the bind call. I have tried using boost::lambda::bind and boost::bind as well. Though this way of using bind works if objects are defined, for example in main function. I assume I am making some silly mistake here, but I am not able to figure out why these all approaches working, or it could be the case that this is not the right way of doing at all.
  Could someone please help me resolve this on how to properly use boost bind for non-static member of class which are stored in stl containers ?</p>
  
  <p>Thanks,</p>