Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2003-10-06 13:43:20

Daniel Wallin <dalwan01_at_[hidden]> writes:

> At 15:23 2003-10-06, David Abrahams wrote:
>>Daniel Wallin <dalwan01_at_[hidden]> writes:
>> > I guess you could always use some exotic operator overloading to shorten
>> > the getter functions.
>> >
>> > p.value(name).get("unnamed") -> p[name | "unnamed"]
>> >
>> > Or something like that, but I'm not sure I think the first version is too
>> > verbose. :)
>>Well, I think your syntax suggestion is beautiful! However, I think
>>there may be some inmplementation difficulty. Can you implement it?
>>There was a reason I went with the two-call .value(x).get(y) syntax.
> Yes, here's an implementation that uses your value(x).get(y)
> internally. I might have missed something that will break this, but
> at least the tests work as expected.

No, I think it works. My reason for that syntax was just to avoid
return type deduction.

So, is anyone else interested in this? Shall Daniel and I make it
into a real library and request a review?

Dave Abrahams
Boost Consulting

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