Boost logo

Boost :

From: John Maddock (john_at_[hidden])
Date: 2005-11-11 07:10:21


>>>> and see if this fixes the problem?
>>>
>>> Which #include?
>>
>>>> from
>>>> /u/troy/boost-regressions/boost/boost/detail/sp_counted_impl.hpp:34,
>>
>> _This_ #include.
>
> BTW: I can't reproduce the problem here, but my Cygwin g++ is a bit
> old (3.4).

No that doesn't make any difference (I see the same errors): in order to
make that fix work, you would have to stop shared_ptr.hpp weak_ptr.hpp and
*all their dependents* from including <memory>. Which is basically what I
was suggesting before (it stops the TR1 version being included anyway).

My cygwin gcc is 3.4.4 and you can reproduce with:

cd libs/tr1/test
bjam std_test_random

shared_ptr then gets included via the unit-test-suite and that triggers the
error, strangely if I have a file that just includes shared_ptr directly it
doesn't *seem* to trigger the problem (but I haven't tried that hard to boil
down a test case).

In any case the compiler is right to complain in this situation: it's just
that *some* compilers take a more relaxed attitude to parsing templates, and
don't seem to mind if some [non-template-] members are incomplete at the
point the template is seen.

John.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk