Boost logo

Boost :

From: Joel de Guzman (djowel_at_[hidden])
Date: 2003-10-04 14:13:06


Hi Fernando,

Why wouldn't this compile?

    int x = 1;
    optional<int&> a;
    optional<int&> b(x);
    a = b; // << *** Here *** <<

IMO, assignment should act like reference_wrapper:

    int x = 1;
    reference_wrapper<int&> a;
    reference_wrapper<int&> b(x);
    a = b; // OK

TIA,

-- 
Joel de Guzman
http://www.boost-consulting.com
http://spirit.sf.net

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