Boost logo

Boost Users :

From: Alexander Gutenev (gutenev_at_[hidden])
Date: 2008-07-30 17:02:14


>> (1) Why stock implementation of intrusive counter is not included to
>> Smart Pointers library ?
>
> No idea. This was requested recently
> on the devel list, but didn't receive an answer.
> http://lists.boost.org/Archives/boost/2008/06/139048.php
>

Thank you. Although the code in that message is more like a pseudocode than
an actual implementation, inline non-template friends seems better than
templates in my code.

>> (2) Is there something wrong with my code ?
>>
>
> It will only compile on windows...
>
>> long operator++(void) { return ::InterlockedIncrement(&count_); }
>> long operator--(void) { return ::InterlockedDecrement(&count_);

I don't think it's a big problem. If I need to compile on anything else,
I'll see the error and use the atomic functions corresponding to those of
windows.


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net