Boost logo

Boost :

Subject: Re: [boost] Review Request: boost.lockfree
From: Alan Manuel Gloria (almkglor_at_[hidden])
Date: 2009-11-26 17:25:16


On Tue, Nov 24, 2009 at 6:59 PM, OvermindDL1 <overminddl1_at_[hidden]> wrote:
> On Tue, Nov 24, 2009 at 3:35 AM, Tim Blechmann <tim_at_[hidden]> wrote:
>> the documentation is available at:
>> http://tim.klingt.org/boost_lockfree/
>>
According to:

http://tim.klingt.org/boost_lockfree/lockfree/reference.html#lockfree.reference.boost__lockfree__atomic_int.members.prefix_operators

> Prefix Operators
>
> T operator ++(void);
>
> Effect: increments value
>
> Returns: value before incrementing

Shouldn't ++x return the value *after* incrementing?

#include<iostream>

int main(void) {
   int x = 3;
   std::cout << ++x << std::endl; // prints "4"
}

I haven't tested the actual library though, so I hope this is just an
error in the docs.

Sincerely,
AmkG


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