Boost logo

Boost Testing :

From: Caleb Epstein (caleb.epstein_at_[hidden])
Date: 2005-06-07 08:11:14

On 6/7/05, Robert Ramey <ramey_at_[hidden]> wrote:

> c) sunpro- 5_3- sunos - the serializaton library fails to build for with a
> syntax error in the iterators/filter.hpp file. I believe that a
> corresponding test in the iterators package also shows this failure. It
> would be nice if someone with the appropriate combination of tools and
> knowledge could look into this.

OK, lets give this a shot. I'm pretty sure we'll start hitting some
OTHER bugs in SunPRO 5.3 when/if we fix this one, but its worth a try.

Here is the error message:
line 129: Error: Default arguments cannot be added in later
declarations of the template function in the same scope.

And here's the relevant section of code from filter_iterator.hpp:

    110 template <class Predicate, class Iterator>
    111 filter_iterator<Predicate,Iterator>
    112 make_filter_iterator(Predicate f, Iterator x, Iterator end =
    113 {
    114 return filter_iterator<Predicate,Iterator>(f,x,end);
    115 }
    117 template <class Predicate, class Iterator>
    118 filter_iterator<Predicate,Iterator>
    119 make_filter_iterator(
    120 typename iterators::enable_if<
    121 is_class<Predicate>
    122 , Iterator
    123 >::type x
    124 , Iterator end = Iterator()
    125 #if BOOST_WORKAROUND(BOOST_MSVC, == 1200)
    126 , Predicate* = 0
    127 #endif
    128 )
    129 {
    130 return filter_iterator<Predicate,Iterator>(x,end);
    131 }

I'm out of my league when it comes to fixing this. What I do know is
that BOOST_NO_SFINAE is defined for this compiler, and enable_if does
NOT work.

Caleb Epstein
caleb dot epstein at gmail dot com

Boost-testing list run by mbergal at