Boost logo

Boost :

From: Giovanni Bajo (giovannibajo_at_[hidden])
Date: 2002-05-13 07:59:03

----- Original Message -----
From: "Mattias Flodin" <flodin_at_[hidden]>
To: <boost_at_[hidden]>
Sent: Monday, May 13, 2002 1:48 PM
Subject: Re: [boost] String formatting library: interest?

> On Mon, May 13, 2002 at 01:29:59PM +0200, Giovanni Bajo wrote:
> > > I may be missing something here, but I thought a format library has
> > > been in the makings for some time now. What is the difference between
> > > this proposal and the library already in progress?
> >
> > I didn't know there was one. Is there a document/link about it?

> Here it is.
> According to the wiki, Samuel Krempp is the one working on it

Thanks for the link.

- As I have already said, I hate the abuse of operators for anything that's
not strictly related with their common usage (with builtin types). operator%
to substitute an argument is a heresy for me, but YMMV. Also, it doesn't
allow formatting options to be specified at parameter-usage time.

- It doesn't substitute/enhance std::string, but it acts as an external
library. You can either feed the result of format() to a stream, or use the
member .str() to get the string.

- It supports advanced formatting by the means of the old-style printf fmt
specifier, which is good (as we already discussed in another post).

- It appears to be complete :)

The first two points are enough for me to stick with my own library. What I
want is something that integrates seamlessly with std::string and also I
don't want to be forced to use printf-style specified just to align my text,
let alone operator% itself.
Let me know your opinions too, I'm not going to work on my idea if you find
that this library already meets your needs.

Giovanni Bajo

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