Boost logo

Boost :

From: Jeff Garland (jeff_at_[hidden])
Date: 2006-08-29 14:40:39


Andy Little wrote:
> "Jeff Garland" <jeff_at_[hidden]> wrote in message
> news:44F4796E.4030406_at_crystalclearsoftware.com...
>> Just to give you the flavor of how this actually needs to look, here's some
>> code to output a 'date duration' type:
>>
>>...snip details...
>>
>> As you can see it's reasonably complex to output what amounts to an integer
>> across wide streams and with customizeable formats. But really, output is
>> trivial compared to input.
>
> I also think that this is kind of funny. On the one hand you provide the pretty
> complex code just to output a date, OTOH it seems that the Boost.Units ( not now
> physical units afaics, certainly not Quan anyway) library is now required to

I didn't say it was required...just trying to raise the bar and get the
library to do something truly revolutionary and useful :-)

> provide a generic output for
> any unit, including AFAICS, money, physical quantities, network data, not
> forgetting apples and oranges, per hour of course. and presumably with as much
> flexibility on each entity as the above.
>
> Good luck with that !

If it isn't hard, it isn't worth doing, right? I can write the 'braindead'
one liner version of operator<<() -- why depend on a library for that? Maybe
I'm wrong, but that's what I thought I read as being proposed. I believe it
can be done and you could probably steal much of the code from date-time to do
it. 99% of of the code doesn't really depend on what is being output/input.
But first you have to have the vision that it's needed...I'm trying to help
with the vision thing ;-)

Jeff


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