Boost logo

Boost :

Subject: Re: [boost] [config] Macro for "using" type alias defects
From: Andrey Semashev (andrey.semashev_at_[hidden])
Date: 2018-04-26 09:56:55


On 04/26/18 09:14, Raffi Enficiaud via Boost wrote:
> Le 26/04/2018 à 01:23, Andrey Semashev via Boost a écrit :
>> On 04/26/18 01:50, Raffi Enficiaud via Boost wrote:
>>> Hi all,
>>>
>>> I was wondering if there is any macro in Boost.Config for advertising
>>> the defect of the "using" support from the compiler.
>>>
>>> I was reported this:
>>>
>>> https://github.com/boostorg/test/pull/140
>>>
>>> and at the time I wrote the thing, I thought that those guards would
>>> have been enough:
>>>
>>> https://github.com/boostorg/test/blob/35c9acf5bd38d625ebd45cf940c5b9a19aa2295b/include/boost/test/tree/test_case_template.hpp#L145-L147
>>>
>>>
>>> (auto, tuple and variadic template sounds to me more difficult to
>>> support than "using" template alias).
>>>
>>>
>>> Would it make sense to have BOOST_NO_CXX11_TYPE_ALIAS?
>>
>> Why not just use a typedef?
>>
>> I would say, using a macro check would make the code less maintainable.
>
> It is not that I do not want your PR :)

I did not intend to advocate my PR, I really wanted to know the
rationale for the new macro.

> Here is why
>
> * the macro checks are already there, but apparently they did not
> capture all I needed.
> * the compiler advertises the support of several C++11 feature, but the
> support seams to be missing in other aspects. I would prefer removing
> this new feature of Boost.Test totally for such compilers as it may pull
> something else that I need to change, or mislead the users.
> * For a developer, typedef or using should be equivalent as this part of
> the code is C++11.

Thanks.


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