[Interest] How do you want to select exactly C++11 with GCC 6+?

Konstantin Tokarev annulen at yandex.ru
Sun Mar 12 22:27:14 CET 2017



12.03.2017, 13:22, "Frédéric Marchal" <frederic.marchal at wowtechnology.com>:
> On Thursday 09 March 2017 14:13:28 Thiago Macieira wrote:
>>  This is a straw poll to see if we should change qmake's behaviour for Qt
>>  5.9.
>>
>>  GCC 6 and ICC 17, in the absence of -std= comipler options, default ot
>>  C++14. So I have two questions:
>>
>>  1) is there a need for qmake to provide a way to select *exactly* C++11, not
>>  a later, available version?
>>
>>  2) if the answer is "yes", how would you prefer to do so?
>>          option I: CONFIG += c++11
>>          option II: CONFIG -= c++14 (obviously disables later editions
>
> too)
>
> I'm a bit lost with all that was said in this thread and I think it might be
> important for qmake usability :-)
>
> As a naive user, if I want to use features available in C++11 such as for-
> range, auto, lambda… I'll simply add CONFIG+=c++11. That's what is required to
> compile my source code. If it comes with more features, then let it be so.
>
> If I must make sure that I don't accidentally use C++14 (or later) features
> that are not supported by an older compiler, I'll add CONFIG-=c++14.
>
> Could somebody kindly summarize the reasons for adding more options such as
> min_c++ or c++latest or restricting to only one C++ version?

Problem is that CONFIG is just a list of strings, so that if initially its value is "c++17",
then doing CONFIG-=c++14 won't have any effect, and if value is "c++11 c++14 c++17"
it will end up as "c++11 c++17"

>
> Thanks,
>
> Frederic
>
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest

-- 
Regards,
Konstantin



More information about the Interest mailing list