Boost logo

Boost :

From: David Abrahams (abrahams_at_[hidden])
Date: 2000-12-21 10:11:39


I just spent a few days tracking down a problem which turned out to be that
this particular combination is poison for me. The symbol names end up going
past MSVC's arbitrary length limits.

The question is, what to do about it? We could turn off iterator_adaptors
when __STL_DEBUG and BOOST_MSVC are #defined, but of course with MSVC we run
a risk of breakdown even without __STL_DEBUG.

I've had some other thoughts:

1. Change the default type parameter for Traits to void (or something). Then
detect that it's void inside the class using boost::is_same from
type_traits, and select boost::iterator_traits<> for a traits_type typedef
using template "magic". I believe we can easily provide
boost::iterator_traits<> for compilers without partial specialization by
using boost::is_pointer<>. This would cut down on the symbol lengths for
adapted iterators that can use the default Traits parameter, but it wouldn't
help in cases where an explicit iterator_traits was needed.

2. The best way to get the symbol names to be really short in many cases is
to cut down on the number of template parameters to iterator_adaptors. For
example, we could ask people to deliver the Iterator parameter and Traits as
typedefs in the Policies class instead of as separate parameters. I'm none
too fond of this idea, since I believe it will harm usability in generic
code.

Thoughts?

-Dave


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