Boost logo

Boost :

From: Eric Niebler (eric_at_[hidden])
Date: 2005-12-20 17:24:22

Edward Diener wrote:
> Eric Niebler wrote:
>>Thorsten Ottosen wrote:
>>>If I add const to the T() conversion, it suddenly works ok again.
>>Yes, that's because for the first line, there are two ways for the
>>conversion to succeed. It could call operator T(), or it could call
>>operator T&() followed by the standard lvalue-to-rvalue conversion.
> Shouldn't operator T() be preferred because operator T&() requires an
> extra conversion ?

Good question. I'll see if I can work that out from the standard.

Eric Niebler
Boost Consulting

Boost list run by bdawes at, gregod at, cpdaniel at, john at