Boost logo

Boost :

From: Jonathan Turkanis (technews_at_[hidden])
Date: 2005-05-09 19:00:04

[My email to Thorsten bounced, so I'm posting it here]


I finally got around to Boost.Range today. Sorry for the long delay.

I've been able to get all the regression tests to pass on VC6, and all the tests
to compile on VC7.0. I can't run the tests on the latter platform because of
errors in Boost.Test.

There are two points which deserve mention:

1. Array support only works for arrays of fundamental types. This should be
mentioned in the docs, since it's not apparent from the regression test results.

2. With VC6, the function template arguments to range_end<>::fun() and
range_size_<>::fun() were not deduced properly, leading to compiler errors.
Since explicitly specifying the arguments caused internal errors, I used a trick
from iostreams, and put the static function fun() in a nested class template
whose template argument can be explicitly specified without problem; e.g.:

        struct range_end<std_container_>
            template< typename C >
            struct inner {
                static BOOST_RANGE_DEDUCED_TYPENAME
                fun( C& c )
                    return c.end();


        template< typename C >
    inline BOOST_DEDUCED_TYPENAME range_result_iterator<C>::type
    end( C& c )
        return range_detail::range_end<range_detail::range<C>::type>::
            inner<C>::fun( c );

This workaround is applied only for VC6. My question is: does this interfere
with the extension protocol? If so, I think I can fix it, but only by adding
another level of indirection.

If you approve, I'll commit these changes. I haven't started working on Borland
or GCC 2.9x yet.


P.S. I ended up not using the collection_traits headers -- the new dispatch
mechanism made that unnecessary.

Boost list run by bdawes at, gregod at, cpdaniel at, john at