Boost logo

Boost Users :

From: Pavel Vozenilek (pavel_vozenilek_at_[hidden])
Date: 2005-06-06 19:36:03

"Pavol Droba" wrote:

>> It definitely seems as a compiler related problem.
BCB has many quirks.

> I have commited a fix for trim and case conversion. Can you please verify
> if it
> helped?
No the bug was the same.

Following changes are needed in the code:

a) leading :: before namespace:

should be

everywhere (BCB doesn't like it).

b) the begin() and end() needs to be fully qualified for BCB:

                    boost::begin(Input), <<== here
                    boost::end(Input), <<== here
                    IsSpace ),

on both places where compiler complains.

c) The iterator needs to be explicitly declared.

I rewrote it into:

        template<typename SequenceT, typename PredicateT>
        inline void trim_right_if(SequenceT& Input, PredicateT IsSpace)
            SequenceT::iterator it =
boost::algorithm::detail::trim_end(boost::begin(Input), boost::end(Input),
            Input.erase(it, boost::end(Input));


        template<typename SequenceT, typename PredicateT>
        inline void trim_left_if(SequenceT& Input, PredicateT IsSpace)
            SequenceT::iterator it =
boost::algorithm::detail::trim_begin(boost::begin(Input), boost::end(Input),
            Input.erase(boost::begin(Input), it);


and then it compiles (with your latest CVS version).


Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at