Boost logo

Boost :

From: John Maddock (john_at_[hidden])
Date: 2006-07-10 06:06:46


Not sure what we can do about this but:

#include <boost/shared_array.hpp>

doesn't compile when Boost.TR1 is added to the include path. We've been
through this before with shared_ptr.hpp and a solution was found, any chance
of some magic here as well? The alternative is for all the
shared_ptr/shared_array code to include <boost/config/no_tr1/memory.hpp>
rather than <memory> directly. In fact the latter option is probably easier
to maintain in the long run: the problem is sporadic, hard to reproduce
(because it depends upon which headers are included and in which order), and
even harder to track down :-(

Sorry, but there ain't no easy way....

Thanks,

John

Here are the compiler errors:

gcc-C++-action
../../../bin/boost/libs/tr1/test/std_test_boost.test/gcc/debug/st
d_test_boost.o
In file included from
/cygdrive/c/data/boost/develop/boost/boost/tr1/memory.hpp:
56,
                 from
/cygdrive/c/data/boost/develop/boost/boost/tr1/tr1/memory:
28,
                 from
/cygdrive/c/data/boost/develop/boost/boost/detail/shared_c
ount.hpp:32,
                 from
/cygdrive/c/data/boost/develop/boost/boost/shared_array.hp
p:26,
                 from
/cygdrive/c/data/boost/develop/boost/libs/tr1/test/test_bo
ost.cpp:10:
/cygdrive/c/data/boost/develop/boost/boost/shared_ptr.hpp:423: error: field
`pn'
 has incomplete type
/cygdrive/c/data/boost/develop/boost/boost/shared_ptr.hpp: In constructor
`boost
::shared_ptr<T>::shared_ptr()':
/cygdrive/c/data/boost/develop/boost/boost/shared_ptr.hpp:144: error: class
`boo
st::shared_ptr<T>' does not have any field named `pn'
/cygdrive/c/data/boost/develop/boost/boost/shared_ptr.hpp: In constructor
`boost
::shared_ptr<T>::shared_ptr(Y*)':
/cygdrive/c/data/boost/develop/boost/boost/shared_ptr.hpp:149: error: class
`boo
st::shared_ptr<T>' does not have any field named `pn'
/cygdrive/c/data/boost/develop/boost/boost/shared_ptr.hpp:151: error: `pn'
undec
lared (first use this function)
/cygdrive/c/data/boost/develop/boost/boost/shared_ptr.hpp:151: error: (Each
unde
clared identifier is reported only once for each function it appears in.)
/cygdrive/c/data/boost/develop/boost/boost/shared_ptr.hpp: In constructor
`boost
::shared_ptr<T>::shared_ptr(Y*, D)':
/cygdrive/c/data/boost/develop/boost/boost/shared_ptr.hpp:160: error: class
`boo
st::shared_ptr<T>' does not have any field named `pn'
/cygdrive/c/data/boost/develop/boost/boost/shared_ptr.hpp:162: error: `pn'
undec
lared (first use this function)
/cygdrive/c/data/boost/develop/boost/boost/shared_ptr.hpp: In constructor
`boost
::shared_ptr<T>::shared_ptr(Y*, D, A)':
/cygdrive/c/data/boost/develop/boost/boost/shared_ptr.hpp:167: error: class
`boo
st::shared_ptr<T>' does not have any field named `pn'
/cygdrive/c/data/boost/develop/boost/boost/shared_ptr.hpp:169: error: `pn'
undec
lared (first use this function)
/cygdrive/c/data/boost/develop/boost/boost/shared_ptr.hpp: In member
function `b
oost::shared_ptr<T>& boost::shared_ptr<T>::operator=(const
boost::shared_ptr<T>&
)':
/cygdrive/c/data/boost/develop/boost/boost/shared_ptr.hpp:180: error: `pn'
undec
lared (first use this function)
/cygdrive/c/data/boost/develop/boost/boost/shared_ptr.hpp: In constructor
`boost
::shared_ptr<T>::shared_ptr(const boost::weak_ptr<Y>&)':
/cygdrive/c/data/boost/develop/boost/boost/shared_ptr.hpp:187: error: class
`boo
st::shared_ptr<T>' does not have any field named `pn'
/cygdrive/c/data/boost/develop/boost/boost/shared_ptr.hpp: In constructor
`boost
::shared_ptr<T>::shared_ptr(const boost::shared_ptr<Y>&)':
/cygdrive/c/data/boost/develop/boost/boost/shared_ptr.hpp:194: error: class
`boo
st::shared_ptr<T>' does not have any field named `pn'
/cygdrive/c/data/boost/develop/boost/boost/shared_ptr.hpp: In constructor
`boost
::shared_ptr<T>::shared_ptr(const boost::shared_ptr<Y>&,
boost::detail::static_c
ast_tag)':
/cygdrive/c/data/boost/develop/boost/boost/shared_ptr.hpp:199: error: class
`boo
st::shared_ptr<T>' does not have any field named `pn'
/cygdrive/c/data/boost/develop/boost/boost/shared_ptr.hpp: In constructor
`boost
::shared_ptr<T>::shared_ptr(const boost::shared_ptr<Y>&,
boost::detail::const_ca
st_tag)':
/cygdrive/c/data/boost/develop/boost/boost/shared_ptr.hpp:204: error: class
`boo
st::shared_ptr<T>' does not have any field named `pn'
/cygdrive/c/data/boost/develop/boost/boost/shared_ptr.hpp: In constructor
`boost
::shared_ptr<T>::shared_ptr(const boost::shared_ptr<Y>&,
boost::detail::dynamic_
cast_tag)':
/cygdrive/c/data/boost/develop/boost/boost/shared_ptr.hpp:209: error: class
`boo
st::shared_ptr<T>' does not have any field named `pn'
/cygdrive/c/data/boost/develop/boost/boost/shared_ptr.hpp:213: error: `pn'
undec
lared (first use this function)
/cygdrive/c/data/boost/develop/boost/boost/shared_ptr.hpp: In constructor
`boost
::shared_ptr<T>::shared_ptr(const boost::shared_ptr<Y>&,
boost::detail::polymorp
hic_cast_tag)':
/cygdrive/c/data/boost/develop/boost/boost/shared_ptr.hpp:218: error: class
`boo
st::shared_ptr<T>' does not have any field named `pn'
/cygdrive/c/data/boost/develop/boost/boost/shared_ptr.hpp: In constructor
`boost
::shared_ptr<T>::shared_ptr(std::auto_ptr<_Tp1>&)':
/cygdrive/c/data/boost/develop/boost/boost/shared_ptr.hpp:229: error: class
`boo
st::shared_ptr<T>' does not have any field named `pn'
/cygdrive/c/data/boost/develop/boost/boost/shared_ptr.hpp:232: error: `pn'
undec
lared (first use this function)
/cygdrive/c/data/boost/develop/boost/boost/shared_ptr.hpp: In constructor
`boost
::shared_ptr<T>::shared_ptr(Ap, typename
boost::detail::sp_enable_if_auto_ptr<Ap
, int>::type)':
/cygdrive/c/data/boost/develop/boost/boost/shared_ptr.hpp:239: error: class
`boo
st::shared_ptr<T>' does not have any field named `pn'
/cygdrive/c/data/boost/develop/boost/boost/shared_ptr.hpp:242: error: `pn'
undec
lared (first use this function)
/cygdrive/c/data/boost/develop/boost/boost/shared_ptr.hpp: In member
function `b
oost::shared_ptr<T>& boost::shared_ptr<T>::operator=(const
boost::shared_ptr<Y>&
)':
/cygdrive/c/data/boost/develop/boost/boost/shared_ptr.hpp:257: error: `pn'
undec
lared (first use this function)
/cygdrive/c/data/boost/develop/boost/boost/shared_ptr.hpp: In member
function `b
ool boost::shared_ptr<T>::unique() const':
/cygdrive/c/data/boost/develop/boost/boost/shared_ptr.hpp:385: error: `pn'
undec
lared (first use this function)
/cygdrive/c/data/boost/develop/boost/boost/shared_ptr.hpp: In member
function `l
ong int boost::shared_ptr<T>::use_count() const':
/cygdrive/c/data/boost/develop/boost/boost/shared_ptr.hpp:390: error: `pn'
undec
lared (first use this function)
/cygdrive/c/data/boost/develop/boost/boost/shared_ptr.hpp: In member
function `v
oid boost::shared_ptr<T>::swap(boost::shared_ptr<T>&)':
/cygdrive/c/data/boost/develop/boost/boost/shared_ptr.hpp:396: error: `pn'
undec
lared (first use this function)
/cygdrive/c/data/boost/develop/boost/boost/shared_ptr.hpp: In member
function `b
ool boost::shared_ptr<T>::_internal_less(const boost::shared_ptr<Y>&)
const':
/cygdrive/c/data/boost/develop/boost/boost/shared_ptr.hpp:401: error: `pn'
undec
lared (first use this function)
/cygdrive/c/data/boost/develop/boost/boost/shared_ptr.hpp: In member
function `v
oid* boost::shared_ptr<T>::_internal_get_deleter(const std::type_info&)
const':
/cygdrive/c/data/boost/develop/boost/boost/shared_ptr.hpp:406: error: `pn'
undec
lared (first use this function)
In file included from
/cygdrive/c/data/boost/develop/boost/boost/tr1/memory.hpp:
57,
                 from
/cygdrive/c/data/boost/develop/boost/boost/tr1/tr1/memory:
28,
                 from
/cygdrive/c/data/boost/develop/boost/boost/detail/shared_c
ount.hpp:32,
                 from
/cygdrive/c/data/boost/develop/boost/boost/shared_array.hp
p:26,
                 from
/cygdrive/c/data/boost/develop/boost/libs/tr1/test/test_bo
ost.cpp:10:
/cygdrive/c/data/boost/develop/boost/boost/weak_ptr.hpp: At global scope:
/cygdrive/c/data/boost/develop/boost/boost/weak_ptr.hpp:168: error: field
`pn' h
as incomplete type
/cygdrive/c/data/boost/develop/boost/boost/weak_ptr.hpp: In constructor
`boost::
weak_ptr<T>::weak_ptr()':
/cygdrive/c/data/boost/develop/boost/boost/weak_ptr.hpp:39: error: class
`boost:
:weak_ptr<T>' does not have any field named `pn'
/cygdrive/c/data/boost/develop/boost/boost/weak_ptr.hpp: In constructor
`boost::
weak_ptr<T>::weak_ptr(const boost::weak_ptr<Y>&)':
/cygdrive/c/data/boost/develop/boost/boost/weak_ptr.hpp:64: error: class
`boost:
:weak_ptr<T>' does not have any field named `pn'
/cygdrive/c/data/boost/develop/boost/boost/weak_ptr.hpp: In constructor
`boost::
weak_ptr<T>::weak_ptr(const boost::shared_ptr<Y>&)':
/cygdrive/c/data/boost/develop/boost/boost/weak_ptr.hpp:70: error: class
`boost:
:weak_ptr<T>' does not have any field named `pn'
/cygdrive/c/data/boost/develop/boost/boost/weak_ptr.hpp: In member function
`boo
st::weak_ptr<T>& boost::weak_ptr<T>::operator=(const boost::weak_ptr<Y>&)':
/cygdrive/c/data/boost/develop/boost/boost/weak_ptr.hpp:80: error: `pn'
undeclar
ed (first use this function)
/cygdrive/c/data/boost/develop/boost/boost/weak_ptr.hpp: In member function
`boo
st::weak_ptr<T>& boost::weak_ptr<T>::operator=(const
boost::shared_ptr<Y>&)':
/cygdrive/c/data/boost/develop/boost/boost/weak_ptr.hpp:88: error: `pn'
undeclar
ed (first use this function)
/cygdrive/c/data/boost/develop/boost/boost/weak_ptr.hpp: In member function
`lon
g int boost::weak_ptr<T>::use_count() const':
/cygdrive/c/data/boost/develop/boost/boost/weak_ptr.hpp:125: error: `pn'
undecla
red (first use this function)
/cygdrive/c/data/boost/develop/boost/boost/weak_ptr.hpp: In member function
`boo
l boost::weak_ptr<T>::expired() const':
/cygdrive/c/data/boost/develop/boost/boost/weak_ptr.hpp:130: error: `pn'
undecla
red (first use this function)
/cygdrive/c/data/boost/develop/boost/boost/weak_ptr.hpp: In member function
`voi
d boost::weak_ptr<T>::swap(boost::weak_ptr<T>&)':
/cygdrive/c/data/boost/develop/boost/boost/weak_ptr.hpp:141: error: `pn'
undecla
red (first use this function)
/cygdrive/c/data/boost/develop/boost/boost/weak_ptr.hpp: In member function
`voi
d boost::weak_ptr<T>::_internal_assign(T*, const
boost::detail::shared_count&)':

/cygdrive/c/data/boost/develop/boost/boost/weak_ptr.hpp:147: error: `pn'
undecla
red (first use this function)
/cygdrive/c/data/boost/develop/boost/boost/weak_ptr.hpp: In member function
`boo
l boost::weak_ptr<T>::_internal_less(const boost::weak_ptr<Y>&) const':
/cygdrive/c/data/boost/develop/boost/boost/weak_ptr.hpp:152: error: `pn'
undecla
red (first use this function)

    "g++" -c -DTEST_STD_HEADERS=1 -g -O0 -fno-inline -Wall -ftemplate-depth-25
5 -I"/cygdrive/c/data/boost/develop/boost/boost/tr1/tr1" -I"/cygdrive/c/data/boo
st/develop/boost" -I "/cygdrive/c/data/boost/develop/boost" -o
"../../../bin/bo
ost/libs/tr1/test/std_test_boost.test/gcc/debug/std_test_boost.o"
"/cygdrive/c/d
ata/boost/develop/boost/libs/tr1/test/test_boost.cpp"


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