Boost logo

Boost :

Subject: Re: [boost] [variant] assign and access the assigned value simultaneously
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2014-03-19 11:16:30


AMDG

On 03/19/2014 12:26 AM, TONGARI J wrote:
> 2014-03-19 15:13 GMT+08:00 Antony Polukhin <antoshkka_at_[hidden]>:
>
>> 2014-03-14 10:22 GMT+04:00 feverzsj <feverzsj_at_[hidden]>:
>> <...>
>>
>>> why not supply a interface like:
>>>
>>> Val& v = var.assign(val);
>>>
>>> for simplity, and the unnecessary "get" is also elimited.
>>>
>>
>> <snip>
>>
>
> <snip>
> Seems reasonable to me, sometimes we do want to do some immediate
> operations after the assignment.
>

I don't think it's worth cluttering the interface.
It's one more function that has to be documented and
tested. I don't see this as being a common use and
there's nothing stopping anyone who wants such a
function from implementing it himself as a non-member.

In Christ,
Steven Watanabe


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