|
Boost : |
From: David Maisonave (boost_at_[hidden])
Date: 2006-01-30 05:01:23
"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.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk