Boost logo

Boost :

From: Pavol Droba (droba_at_[hidden])
Date: 2003-10-23 06:36:59


On Thu, Oct 23, 2003 at 08:25:55PM +1000, Thorsten Ottosen wrote:
> From: "Ross MacGregor" <ross__macgregor_at_[hidden]>
> [snip]
> > Did I miss a more important aspect of chaining?
>
> no.

For _copy variants it is natural and can save you the need for definition of temp variable.
You can write:

        if ( to_upper_copy( trim_copy(str) )=="ABC" )
        {
                ...
        }

Instead of

        std::string str1=trim_copy(str);
        to_upper(str1);

        if ( str1=="ABC" )
        {
                ...
        }

Regards,

Pavol


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