Boost logo

Boost :

From: Lars Gullik Bjønnes (larsbj_at_[hidden])
Date: 2002-06-11 09:06:25


"David Abrahams" <david.abrahams_at_[hidden]> writes:

| From: "Richard Peters" <R.A.Peters_at_[hidden]>
>
>> Then you can replace the postfix increment operator with
>>
>> number operator++(int)
>> { return postfix_increment(*this); }
>
| Why not just:
>
| number operator++(int)
| {
| return postfix_incrementer<number>(*this);
| }
>
| ?

When testing this and the prev. version with gcc, I get a 2:3
perfomance difference in favour of the traditional solution.

Gcc 3.1 -O3
./postincr
Number1: 6650000
Number2: 9900000

-- 
	Lgb

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