Subject: Re: [boost] [any] new version
From: Ilya Bobir (ilya.bobir_at_[hidden])
Date: 2011-09-02 12:01:53
On Fri, Sep 2, 2011 at 7:28 AM, Artyom Beilis <artyomtnk_at_[hidden]> wrote:
>> From: Martin Bidlingmaier <Martin.Bidlingmaier_at_[hidden]>
>> I've written a new version of boost::any. It does not
>> depend on rtti and uses a static integer value instead of
>> std::type_info to store type information.
> Please don't do this!
> unsigned int next_id()
> Â Â static unsigned int previous_id = 0; Â //0 is not assigned to a type
> Â Â ++previous_id;
> Â Â return previous_id;
Would not this be non-thread safe?
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk