Boost logo

Boost :

Subject: Re: [boost] [config] gcc-4.4 and BOOST_NO_SFINAE_EXPR
From: John Maddock (boost.regex_at_[hidden])
Date: 2012-09-24 11:33:23


>>> As part of our work to make result_of sfinae-friendly, Daniel Walker and
>>> I have discovered that gcc-4.4 doesn't have very good support for
>>> generalized sfinae for expressions.
>>
>> Then, wouldn't it be nice to ask gcc developers to change the
>> availability of "Solving the SFINAE problem for expressions"
>> from gcc 4.4 to gcc 4.5 in http://gcc.gnu.org/projects/cxx0x.html ?
>
> Shouldn't whether this macro is defined or not depend on whether the
> associated test fails or succeeds, rather than what the compiler claims to
> support?

Ideally, yes that should always be the case. It's always a bit tricky
knowing where to draw the line when the feature works "most of the time" but
fails in tricky cases.

> If the test is not strict enough, it could be modified.

Patches welcome.

Also, if the test does actually pass for compiler X but we define the defect
macro anyway because enough real world cases fail, then there should be a
comment in the config file for that compiler stating why the macro is set.
Otherwise some helpful person will likely unset the macro in future ;-)

John.


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