Modify

Opened 12 years ago

Closed 8 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.

Attachments (0)

Change History (3)

comment:1 Changed 10 years ago by Marshall Clow

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

comment:2 Changed 9 years ago by Steven Watanabe

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

comment:3 Changed 8 years ago by Steven Watanabe

Resolution: Nonefixed
Status: newclosed

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

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain No-Maintainer.
The resolution will be deleted.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.