Boost logo

Boost :

From: Gennadiy Rozental (gennadiy.rozental_at_[hidden])
Date: 2004-09-23 12:51:15


"John Torjo" <john.lists_at_[hidden]> wrote in message
news:4152776F.8040303_at_torjo.com...
> >
> > inline formatob_t & format( format_type s)
> > {
> > FormatObject::format( s );
> > return( *this );
> > }
> >
> > formatob( vec ).format( " + " )
> >
> > has the same type as
> >
> > formatob( vec )
> >
> > What are you talking about? Why would you bother what
FormatObject::format
> > is returning?
> >
>
> So that you can manipulate the formatob() object multiple times, like:
> formatob().do_this().do_that().and_that_too();

[I don't know why you removed original code. Let see it again.]

You must be joking. Do you think I can't read code??
formatob().format() return *** *this **** NOT FormatObject::format();

So my question still stand.

> And because it's what needs to be written/read to the stream.
>
> Best,
> John

Actually I just implemented, as a prove of concept, small (~250 lines)
header that conceptually does ALL (not 100% sure but it seems like it) that
submitted library do in regards to
output. It even more flexible and safe.
It does not use any deducer. And it does not require any hierarhy of
formatters.

See also atached example. It compiles and works under VC7.1

Gennadiy.

begin 666 OutFrmt.rar
M4F%R(1H'`,^0<P``#0````````#6870_at_D"H`W@(``*$*```"CS-^9_at_9N-S$=
M,P4`( ```&$N8W!P`/ F^BT,&5#,C3T8%7OJ5\':*E9)M$(*MO20!+?![UE%
M$R#-C+/RI^"VZ:>[U*%IH2%QMPD90TT)5O6^B/\YG'S.8\8>-9F<;S]/F-??
M<YTYQ+/!.HKK+<>(@JP[#3[];IZ!3VU'JV[=S*1F)Z"\GI,ZQ]'R:-*\X-TK
MX:>EAB_at_CE")EZ-V(D K8G7F)1ZM .*4SON9D<3/OJK>R?&J*R+5,V?IZ$,F5
MXN(4)'Q@\R\U[,OBMVW@$D&YUB-@$L#T[H):(S7+GP77TRXJ`$T#C[<OB7#'
M5V6^RKOO)"0M.6B,$;E7P>.3(=Z..ZMEX'**7U#7'@7L[#D;!(&ORI$AR.(>
M&: 179T97UOG722+GIM2&G!%*,="6ILATQ3EFNS'CC05JZ,&\H_)Q2RT. /F
MV+J'_,W3T9+CG>2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