Boost logo

Boost :

From: Noah Roberts (roberts.noah_at_[hidden])
Date: 2007-03-28 14:37:24

Martin Schulz wrote:
>> Nope. Your dialog manager would keep track of the unit and
>> set appropriately upon initialization and/or user
>> interaction. Your reader would then be as simple as setting
>> the value directly to the quantity.
>> Alternatively you might have something like this:
>> quantity<abstract> on_dialog_ok()
>> {
>> quantity<abstract> dist;
>> dist.set_unit(combo.selected_item().data());
>> dist.set_value(entry.value().as_double());
>> }
>> No more switch statement smell.
> Yes, but then again, the unit of "dist" cannot be hardcoded in its C++
> type anymore. I may be missing something, but I do not see how the above
> code could be made to work with the library under review.

Yeah, it doesn't. That isn't what is being discussed. What is being
discussed is the lack of support for this feature, hence discussing how
the feature would work is important.

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