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 )
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 , 15 years ago
| Component: | None → lambda |
|---|---|
| Description: | modified (diff) |
| Owner: | changed from to |
| Severity: | → Showstopper |
| Status: | assigned → new |
comment:2 by , 13 years ago
comment:3 by , 12 years ago
| Resolution: | None → fixed |
|---|---|
| Status: | new → closed |
Note:
See TracTickets
for help on using tickets.

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