Boost logo

Boost :

Subject: Re: [boost] [bind] class template 'value' can corrupt compilability of sound code: Ticket #5141
From: Joachim Faulhaber (afojgo_at_[hidden])
Date: 2011-01-31 05:31:13


2011/1/30 Joel Falcou <joel.falcou_at_[hidden]>:
> I was struck by the same behavior on MSVC with nt2. We had to put () or
> inverse the test ( seems 0 >= value is parsed correctly).

At least, we should add a convention to put () around affected
expressions to the list of requirements for boost libraries. It could
also be checked by the inspect tool.

> I think it's a known limitation of MSVC

I've sent a bug report to MS Connect as Jeff suggested ...

> as I encounter it quite a lot.

I have looked in trunk/boost for all

template<class T, ...> class value
template<class T, ...> stuct value

templates that can trigger the effect.

# library location fixable
1 bind bind.hpp(112) yes
2 accumulators value_accumulator.hpp(60) no
3 flyweight value_tag.hpp(41) yes
4 proto traits.hpp(280) ?
5 phoenix primitives.hpp(114) no
6 core\value.hpp(47) no
7 xpressive regex_actions.hpp(691) no

Most of these value templates are in the library's interfaces and can
most likely not be renamed without breaking user code. Because these
libraries are also used in other libraries, the chance for users to
run into this difficulty is not so small.

Joachim


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