Boost logo

Boost :

From: Larry Evans (cppljevans_at_[hidden])
Date: 2006-01-30 08:15:48


On 01/30/2006 04:01 AM, David Maisonave wrote:
> "David Maisonave" <boost_at_[hidden]> wrote in message
> news:<000101c6255d$eec482c0$0f00a8c0_at_david>...
>
>>"Larry Evans" <cppljevans_at_[hidden]> wrote in message
>>news:<drk4c6$vu8$1_at_[hidden]>...
>>
>>>On 01/29/2006 06:15 PM, David Maisonave wrote:
>>>
>>>>"Larry Evans" <cppljevans_at_[hidden]> wrote in message
>>>>news:<drafuf$v06$1_at_[hidden]>...
>>>
>>>[snip]
>>>Do you mean the test driver code in libs/policy_ptr/test is very
>>>confusing? In particular, do you find the std_ptr_shared_ptr_test.cpp
>>>confusing?
>>
>>I could only answer that question if I could find that file. Where are
>>you getting this file from? I don't see a reference to it using the
>>following link:
>>http://cvs.sourceforge.net/viewcvs.py/boost-sandbox/boost-sandbox/boos
>>t/poli
>>cy_ptr/policy/
>>
>>Could you please provide a full link to this test?
>
>
> Just found the link to it:
> http://cvs.sourceforge.net/viewcvs.py/boost-sandbox/boost-sandbox/libs/polic
> y_ptr/test/
>
> I downloaded both the test code, and the policy_ptr code, and the policy_ptr
> code does not compile.
> I tried compiling it on VC++ 7.1 and GNU 3.x, and both fail to compile the
> code.
>
>
> Boost\Policy_ptr\Policy\no_copy.hpp
> The above header gives a compile error for the following line:
> #include "../always_false.hpp" //(Line 12)
>
> Boost\Policy_ptr\Policy\ref_counted.hpp
> The above header gives the following error:
> Boost\Policy_ptr\Policy\ref_counted.hpp(155) : error C2061: syntax error :
> identifier 'U'
>
> Line 155 has the following:
> BOOST_SP_DECLARE_TEMPLATE_FRIEND(U, ref_counted_, 2)
>
> I also notice the following:
> // In Boost\Policy_ptr\Policy\ref_linked.hpp Line 20
> ref_node(void)
> : prev_(this), next_(this) { }
>
> I would think the above code would result in undefined behavior, since a
> pointer to an object that is not yet fully constructed is being pass to a
> data member.
>
> I'm not sure how the above code would have been tested, if it's not
> compliable.

The following is from my working copy of the code:
<----------- cut here ------------
cd
/home/evansl/prog_dev/boost-cvs/ro/boost/sandbox/lje/libs/policy_ptr/test/
bjam --v2 std_ptr_shared_ptr_test
warning: Python location is not configured
warning: the Boost.Python library won't be built
Building Boost.Regex with the optional Unicode/ICU support disabled.
Please refer to the Boost.Regex documentation for more information
(and if you don't know what ICU is then you probably don't need it).
...patience...
...found 483 targets...
...updating 4 targets...
gcc.compile.c++
../../../../../bin.v2/sandbox/lje/libs/policy_ptr/test/std_ptr_shared_ptr_test.test/gcc/debug/std_ptr_shared_ptr_test.o
gcc.link
../../../../../bin.v2/sandbox/lje/libs/policy_ptr/test/std_ptr_shared_ptr_test.test/gcc/debug/std_ptr_shared_ptr_test
testing.capture-output
../../../../../bin.v2/sandbox/lje/libs/policy_ptr/test/std_ptr_shared_ptr_test.test/gcc/debug/std_ptr_shared_ptr_test.run
**passed**
../../../../../bin.v2/sandbox/lje/libs/policy_ptr/test/std_ptr_shared_ptr_test.test/gcc/debug/std_ptr_shared_ptr_test.test
...updated 4 targets...

Compilation finished at Mon Jan 30 07:06:42
>----------- cut here ------------
Obviously the repository is not in sync with my working copy,
or maybe the compiler is different. My gcc is (from contents of
~/user-config.jam):

<----------- cut here ------------
# Configure specific gcc version, giving alternative name to use
using gcc : : "/usr/bin/g++-4.1" ;
>----------- cut here ------------
I believe the code was developed and tested with g++-3.4.

I will upload the latest code and make sure it's in sync with
my working copies. It takes about 8 hrs. for the upload
to be seen in the view-cvs interface.

Thanks for pointing this out. Sorry for the mistake.


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