Boost logo

Boost :

From: Matthias Troyer (troyer_at_[hidden])
Date: 2005-12-30 05:56:49

On Dec 28, 2005, at 8:34 PM, Eric Niebler wrote:

> You can help improve Boost.Foreach and Boost.Typeof for your
> favorite compiler! Read on.
> Eric Niebler wrote:
>> Thorsten Ottosen wrote:
>>> Now it works on vc7.1 too.
>> getting this to work with vc7.1 is a major advance. Thanks.
> I am now using the compile-time-const-rvalue-detection trick in the
> new-and-improved BOOST_FOREACH. For the first time, it's passing
> its tests at 100% for VC7.1 and VC8. Also, const rvalues are being
> detected on gcc 3.4+ with zero runtime overhead. Very nice!
> OK, now here's a simple thing anybody can do to improve Foreach and
> Typeof. Try compiling the attached file on your favorite compiler
> and report the results. I already know it works for VC7.1+ and gcc
> 3.4+. Everything else is up for grabs.

IBM Visual Age C++ version 6 and 7 gives the following compile time

  line 68.17: 1540-0135 (S) The array bound cannot be zero.

Adding 1 to all the array sizes gives the following error:

line 22.40: 1540-0704 (S) The definitions of
>,mpl_::bool_<1==sizeof((impl_::is_true(impl_::is_rvalue((1 ?
impl_::make_probe(cf)..." and
>,mpl_::bool_<1==sizeof((impl_::is_true(impl_::is_rvalue((1 ?
have the same linkage signature

> Extra credit #1: If it doesn't compile for you, patch it so it
> does. :-)
> Extra credit #2: Find a formulation that is 100% standard
> compliant. Back up your claim by citing references from the
> standard. :-)))

I'll do that when I find some time.


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