|
Boost : |
Subject: Re: [boost] An extension to boost::variant
From: Chris Hamilton (chamilton_at_[hidden])
Date: 2009-02-09 21:45:10
>> v = boost::reference_wrapper<foo>(f);
>
> You can also write that as
>
> v = boost::ref(f);
Thanks, I hadn't actually seen the reference_wrapper library before, so
didn't look too deeply (just far enough to know that passing the raw
object didn't work).
So, effectively, I'm proposing a small addition to boost::variant, in
some sense 'embedding' the boost::reference_wrapper functionality into
it, and applying a little syntactic sugar. Does anybody see any value
in this, or is it just me? (In the meantime, I can always use a small
wrapper to boost::variant that adds these changes.)
Chris
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk