Size: a a a

2020 August 14

SH

Serhii Herashchenko in supapro.cxx
Anes
Ребята всем привет. Как узнать версию плюсов. Пробую через вывод переменной __cplusplus она выводит 1
какой компилятор
источник

A

Anes in supapro.cxx
Ilia Zviagin
что такое версия плюсов?
версия стандарта вроде как
источник

A

Anes in supapro.cxx
Serhii Herashchenko
какой компилятор
gcc вроде как
источник

IZ

Ilia Zviagin in supapro.cxx
Anes
gcc вроде как
gcc --version
источник

A

Anes in supapro.cxx
4.1.2 20080704
источник

IZ

Ilia Zviagin in supapro.cxx
Anes
4.1.2 20080704
молодец. узнал!
источник

e

eugene_steps in supapro.cxx
Ilia Zviagin
Я вот шизею с вас, ты думаешь, сети каждый год что ли меняются?
за 13 лет сети могут поменяться, а плюсы точно поменялись)
источник

IZ

Ilia Zviagin in supapro.cxx
eugene_steps
за 13 лет сети могут поменяться, а плюсы точно поменялись)
вот я и шизею...
источник

SH

Serhii Herashchenko in supapro.cxx
Anes
gcc вроде как
__cplusplus
This macro is defined when the C++ compiler is in use. You can use __cplusplus to test whether a header is compiled by a C compiler or a C++ compiler. This macro is similar to __STDC_VERSION__, in that it expands to a version number. Depending on the language standard selected, the value of the macro is 199711L for the 1998 C++ standard, 201103L for the 2011 C++ standard, 201402L for the 2014 C++ standard, 201703L for the 2017 C++ standard, or an unspecified value strictly larger than 201703L for the experimental languages enabled by -std=c++2a and -std=gnu++2a.
источник

A

Anes in supapro.cxx
Serhii Herashchenko
__cplusplus
This macro is defined when the C++ compiler is in use. You can use __cplusplus to test whether a header is compiled by a C compiler or a C++ compiler. This macro is similar to __STDC_VERSION__, in that it expands to a version number. Depending on the language standard selected, the value of the macro is 199711L for the 1998 C++ standard, 201103L for the 2011 C++ standard, 201402L for the 2014 C++ standard, 201703L for the 2017 C++ standard, or an unspecified value strictly larger than 201703L for the experimental languages enabled by -std=c++2a and -std=gnu++2a.
это я пробовал, говорю же 1 выводит
источник

DP

Denis Paukaev in supapro.cxx
Anes
это я пробовал, говорю же 1 выводит
а что ты ожидаешь? 2?
источник

SH

Serhii Herashchenko in supapro.cxx
Anes
это я пробовал, говорю же 1 выводит
покажи код
источник

A

Anes in supapro.cxx
Denis Paukaev
а что ты ожидаешь? 2?
201300L хотя бы такой вывод, или на подобие
источник

A

Anes in supapro.cxx
Serhii Herashchenko
покажи код
обычный cout вывод в консоль переменной __cplusplus
источник

AS

Anatoly Shirokov in supapro.cxx
Anes
обычный cout вывод в консоль переменной __cplusplus
источник

SH

Serhii Herashchenko in supapro.cxx
Anes
обычный cout вывод в консоль переменной __cplusplus
источник

AS

Anatoly Shirokov in supapro.cxx
да у парня gcc 4.1.2
источник

A

Anes in supapro.cxx
ааа как я понял старая версия gcc. Спасибо
источник

AS

Anatoly Shirokov in supapro.cxx
Anes
ааа как я понял старая версия gcc. Спасибо
источник

A

Anes in supapro.cxx
если я обновлю версию gcc повлияет ли это как то на сборку проекта? и единственный ли это способ узнать версию стандарта? я так понял версии отличаются изменениями в синтаксисе и изменениями в библиотеках?
источник