Boost logo

Boost :

From: Toon Knapen (toon_at_[hidden])
Date: 2001-08-27 03:46:16


Greg Chicares wrote:
> Given
>
> struct S
> { int i0; int i1; double d0; std::string s0;};
>
> I would like to be able to write
>
> S s;
> s["i0"] = "999.9"; // truncates to int
> s["i1"] = "888e3"; // converts to int
> s["d0"] = "777"; // converts to double
> s["s0"] = "hello";
>

It would be very nice if you can put this functionality on top of the
tuples library !

toon


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