Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2003-08-21 06:14:04


Paul Hamilton wrote:
> [...] I propose that we change the code:
>
> static const std::basic_string<Ch, Tr> emptyStr;
>
> To:
>
> const std::basic_string<Ch, Tr> emptyStr = "";
>
> Which basically does exactly the same thing.

= "" is not needed, it just forces a redundant strlen call (at least). As I
already pointed out,

std::basic_string<Ch, Tr> emptyStr;

is enough; or even

os.str(std::basic_string<Ch, Tr>());

(if it doesn't cause parser problems.)


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