Boost logo

Boost :

From: Samuel Krempp (krempp_at_[hidden])
Date: 2002-01-21 05:32:17

On Mon, 2002-01-21 at 04:47, Jeremy Siek wrote:
> index.htm
> Should link to the other example files and the test files. It would be
> great to have short summary of each file.

good idea !

> "glue" is a bad name for this function. How about something like
> "modifier" or even "format" instead (or some other better name).

glue really was meant to be renamed, and today I chose to rename it to
'manip'. it's shorter than modifier, and just as much explicit.

I'm open to popositions..

> Under "Differences of behaviour vs printf"
[ .. ]

ah yes, the HTML documentation is far from perfection..

> Portability issue: Boost.Format uses sstream (which bad for older g++'s)

I hope requiring g++ >= 3.0 is not a show stopper..

The MSVC portability requires that I move some definitions, once done it
seems that format can be compiled with
at least
g++ >=3.0

> trying to compile with KCC, got the following
> warnings and errors. I've only listed each kind of error once.
> They also occur on other lines. I would pay attention to these
> errors. The EDG frontend (used by KCC) it highly standards
> conformant, so these errors are likely problems in the code,
> not in the compiler.
> "", line 28: warning: temporary used for initial value of
> reference to non-const (anachronism)
> oss << format("writing %3, x=%1 : %2-th step \n") [40.23] [50] ["toto"];

ah.. does someone understands this ?
I'm guessing one of the arguments is passed via a temporary (my guess is
The compiler can choose between
operator[](const T&)

So he should use the const one for a temporary, shouldn't he ?

> "../../../boost/format.hpp", line 209: error: type
> "boost::format::basic_format<charT, Traits>::string_t [with
> charT=char, Traits=std::char_traits<char>]" is inaccessible
> typedef typename basic_format<charT, Tr>::string_t string_t;

Yes, the same error was found with MSVC. I fixed this.
(g++ did not see it, and neither did I..)

> ^
> "../../../boost/format/format.ihh", line 448: error: more than one instance of
> overloaded function "std::basic_string<charT, traits,
> Allocator>::insert [with charT=char, traits=std::char_traits<char>,
> Allocator=std::allocator<char>]" matches the argument list:
> function "std::basic_string<charT, traits,
> Allocator>::insert(std::basic_string<charT, traits,
> Allocator>::size_type, std::basic_string<charT, traits,
> Allocator>::size_type, charT) [with charT=char,
> traits=std::char_traits<char>,
> Allocator=std::allocator<char>]"
> function "std::basic_string<charT, traits,
> Allocator>::insert(std::basic_string<charT, traits,
> Allocator>::iterator, std::basic_string<charT, traits,
> Allocator>::size_type, charT) [with charT=char,
> traits=std::char_traits<char>,
> Allocator=std::allocator<char>]"
> argument types are: (int, int, char)
> res.insert(0, 1, ' '); // insert 1 space at pos 0
> ^

ah.. it means '0' needs as much conversion to become a 'size_type' as it
needs for 'iterator'.
It's strange.. I'll explicit the type for 0, and it won't be ambiguous

> In the examples, no need for the asserts. Examples are not tests.


For your other comments, some are due to the fact I upload new versions
to the vault when implementing suggestions (eg operator[], etc..)
the newest modifications are not refelected in the documentation..

I've sent a note,,
to explain what were the different files in the vault.


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