|
Boost : |
From: AlisdairM (alisdair.meredith_at_[hidden])
Date: 2006-02-07 17:43:56
Eric Niebler wrote:
>
> Robert Kawulak wrote:
> > Hi,
> >
> > > From: Eric Niebler
> > >
> > > BOOST_FOREACH is no longer working for any version of Borland.
> >
> > Any
> >
> > > Borland users out there care to submit a patch
> >
> >
> > I've got Borland C++Builder 6.0 (compiler version 5.6.4) and can
> > spend a bit of time on this. Could you give some details (e.g.
> > where to get the version to patch from)?
> >
>
> Excellent. It's in Boost CVS. If that's not practical for you, you
> can also find a separate download inthe Boost File Vault at
> http://www.boost-consulting.com/vault/index.php?directory=Algorithms&
>
> TIA,
I am having problems with boost CVS, and no longer have clean copies to
diff against. My bad.
A first set of patches is that Borland are not coping well with the
ellipses in boost_foreach_is_lightweight_proxy and
boost_foreach_is_noncopyable. Suggest replacing them with a second
template argument which can be deduced on this platform:
[for_each.hpp, around line 150]
#if BOOST_WORKAROUND( __BORLANDC__, BOOST_TESTED_AT(0X581))
template< typename T, typename U >
inline boost::foreach::is_lightweight_proxy<T> *
boost_foreach_is_lightweight_proxy(T *&, U ) { return 0; }
#else
template<typename T>
inline boost::foreach::is_lightweight_proxy<T> *
boost_foreach_is_lightweight_proxy(T *&, ...) { return 0; }
#endif
and
[for_each.hpp, around line 170]
#if BOOST_WORKAROUND( __BORLANDC__, BOOST_TESTED_AT(0X581))
template< typename T, typename U >
inline boost::foreach::is_noncopyable<T> *
boost_foreach_is_noncopyable(T *&, U ) { return 0; }
#else
template<typename T>
inline boost::foreach::is_noncopyable<T> *
boost_foreach_is_noncopyable(T *&, ...) { return 0; }
#endif
I tried using const ref for U initially, but that gives ambiguity
errors.
This does not solve all problems, but seems a reasonable first step.
-- AlisdairM
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk