Boost logo

Boost :

From: Philippe A. Bouchard (philippeb_at_[hidden])
Date: 2002-08-15 12:21:38


"Larry Evans" <jcampbell3_at_[hidden]> wrote:
> Philippe A. Bouchard wrote:
>
> >Here is ptr<> nearly fully portable:
> >http://groups.yahoo.com/group/boost/files/ptr/
> >
> >
> >
> I tried the previous ptr.h with both static ptr<T> in a short
> test driver, check_static.cpp, and in another .cpp file,
> ptrT.cpp, got 0 values for the get_type_id's of the
> instances of the static ptr<T>'s in main. When I
> defined both ptr_ctti::s_size and the ptr_base<T>::s_id's
> in separate files (following the one-defintion) rule,
> everything worked fine.

What compiler are you using? Because static members are like global
variables and modifications should occur sequentially (i.e. when templates
are instanciated).

Philippe A. Bouchard


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