Boost logo

Boost :

From: JOAQUIN LOPEZ MU?Z (joaquin_at_[hidden])
Date: 2006-09-07 15:50:54


----- Mensaje original -----
De: Jon Radoff <jonradoff_at_[hidden]>
Fecha: Jueves, Septiembre 7, 2006 9:25 pm
Asunto: [boost] boost.format(): Unexpected assert failure?

> The following snippet causes an assertion in debug mode on MSVC++ 8.
>
> ---cut---
> string Output;
> string Blank;
> format fmt("Blank string: %s");
> fmt % Blank; // This line causes an assertion in MSVC8
> Output = fmt.str();
> ---cut---
>
> Rather than cause an assertion, shouldn't the formatter properly
> deal with the case of a zero-length string? Or is there a
> preferred way to handle this and/or parameter to pass to the
> formatter to handle zero-length strings?

Hello Jon, I think this problem has been reported in the past
and is already fixed both in the CVS main trunk and the
1.34 branch. You might want to check it out by yourself by
replacing your local copy of boost/format/feed_args.hpp with
the version at:

http://tinyurl.com/kzgdo

(press download on the page referred to by the link above).

Hope this helps,

Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo


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