Subject: Re: [boost] constness in barrier.hpp
From: Gaetano Mendola (mendola_at_[hidden])
Date: 2011-12-22 07:09:54
On 12/22/2011 12:35 PM, Thomas Klimpel wrote:
> Gaetano Mendola wrote:
>> Hi all,
>> simple patch to make const the private member m_threshold in class
> Could you please mention the name of the concerned library in the subject line (such as [thread])?
Next time I will.
> Care to explain which problem your patch solves? (In case it is a "real" problem, you might be
> asked to also open a track ticket for the issue.) Making a non-static member variable const can
> affect the semantics of the entire class. It is not clear to me whether this is also the case here,
> and whether this would be intended.
There is no real problem, I was inspecting that class for other reasons, and I saw that a
private member not meant to be changed during the life-cycle of the class is not marked
const. You can easily see it, the member m_threshold is meant to save the threshold value
across different generation in order to reset the barrier to the original status.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk