Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2004-02-09 11:24:36


Howard Hinnant wrote:
> Reasoning:
>
> foo(A());
>
> expands to:
>
> foo(A(A()));

No, it expands to

    typedef A const CA;
    foo(CA(A()));

The difference is that a const_cast<A&> inside foo is now undefined behavior
(whereas a direct binding would've made it legal.)


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