Opened 17 years ago

Closed 12 years ago

#426 closed Support Requests (fixed)

lambda vs pure virtual functions

Reported by: sw_creator Owned by: No-Maintainer
Milestone: Component: lambda
Version: None Severity: Showstopper
Keywords: Cc:

Description (last modified by Marshall Clow)

Hello all !
i tried to complile this code:
-----------------------
namespace Filter{

class ResultType {...};
class SubExpression
{
public:
  virtual ResultType Result()=0;
};
typedef boost::shared_ptr<SubExpression> SPtrSubExpression;
............
void F()
{
   namespace la=boost::lambda;
   ResultType r;
   vector<SPtrSubExpression> v; 
..................................
   vector<SPtrSubExpression>::const_iterator
i=find_if(v.begin(), v.end(), 
        la::bind(&SubExpression::Result, *la::_1)==r);
}

}
-------------------------
and I received error:

c:\Program
Files\boost-1-32-0\boost\tuple\detail\tuple_basic.hpp(419):
error C2259: 'Filter::SubExpression' : cannot
instantiate abstract class

complier :VC++ 7.1
boost 1.32.0

what's wrong?
thanks.

Change History (3)

comment:1 by Marshall Clow, 15 years ago

Component: Nonelambda
Description: modified (diff)
Owner: changed from urzuga to No-Maintainer
Severity: Showstopper
Status: assignednew

comment:2 by Steven Watanabe, 13 years ago

This can't be completely fixed until #864 is resolved, since the sig protocol is incapable of handling abstract types.

comment:3 by Steven Watanabe, 12 years ago

Resolution: Nonefixed
Status: newclosed

(In [62627]) Enable using result_of with Boost.Lambda. Fixes #426. Fixes #864

Note: See TracTickets for help on using tickets.