|
Boost : |
From: Shunsuke Sogame (mb2act_at_[hidden])
Date: 2006-05-03 00:05:34
Eric Niebler wrote:
> Shunsuke Sogame wrote:
>
>>Hi gurus,
>>
>>Under VC7.1/8,
>>
>> struct xxx : std::vector<int>
>> {
>> virtual void foo() = 0;
>> };
>>
>> void test(xxx& rng)
>> {
>> BOOST_FOREACH (int x, rng) {
>> }
>> }
>>
>>makes error,
>>
>> foreach.hpp(361) : error C2259: 'xxx' : cannot instantiate abstract class
>>
>>
>>GCC3.4.4 compiles.
>>Is this wrong code?
>>
>
>
>
> Thanks for the bug report. This is now fixed both in CVS HEAD and in the
> release branch.
Thanks for fast response!
cvs seems to be outage, but that error reminded me of
"Prefer composition to inheritance" to change my codes :-)
-- Shunsuke Sogame
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk