Boost logo

Boost :

From: David Abrahams (david.abrahams_at_[hidden])
Date: 2001-06-25 06:02:02


I think this has been pointed out before. Unfortunately, development on
boost::format has lapsed. Would you be interested in picking it up and
polishing it for formal review? It would be an incredibly useful library to
have in the official boost suite.

-Dave

----- Original Message -----
From: "Samuel Krempp" <krempp_at_[hidden]>
To: <boost_at_[hidden]>
Sent: Monday, June 25, 2001 6:56 AM
Subject: [boost] boost::format ctors : why copy arguments by value ?

> I am using boost::format (v0.7) happily for some time.
>
> Recently I tried compiling the example program, and g++ (compiled from a
> recent 3.1 cvs ) refused because of some copy ctors of members of
basic_stringstream
> being private.
>
> Is there a reason why parameters are copied instead of passed by
> reference in those ctors :
> template<typename A>
> basic_format(const charT* ca, A a);
> (idem for all multi-argument ctors..)
>
> Because, when A is boost::format, as needed in
> std::cout << format("The Truth is %1", format("%1 != %2", 1, 2)) <<
> '\n';
> that implies copying a basic_stringstream, and that is not allowed.
>
> using the following ctors, the test program compiled and ran correctly :
> template<typename A>
> basic_format(const charT* ca, const A& a);
>
> and I humbly think this is the way it should be..
>
> --
> Sam
>
>
>
> Info: http://www.boost.org Unsubscribe:
<mailto:boost-unsubscribe_at_[hidden]>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>


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