Why is the Visual Studio Community 2017 C++ standard C++98?
Clash Royale CLAN TAG#URR8PPP
up vote
24
down vote
favorite
Yesterday I upgraded to the latest VS Community 2017 (the previous one was installed last year) and wanted to check the C++ standard. So I run the following code that checks it, and as it turns out, I have C++98:
#include<iostream>
using namespace std;
int main()
cout << __cplusplus << endl;
system("pause");
Which outputs
199711
Why don't I have the latest C++ standard?
c++ visual-studio standards
 |Â
show 1 more comment
up vote
24
down vote
favorite
Yesterday I upgraded to the latest VS Community 2017 (the previous one was installed last year) and wanted to check the C++ standard. So I run the following code that checks it, and as it turns out, I have C++98:
#include<iostream>
using namespace std;
int main()
cout << __cplusplus << endl;
system("pause");
Which outputs
199711
Why don't I have the latest C++ standard?
c++ visual-studio standards
Try changing the related project properties.
â ÃÂìýÃÂñ á¿¥Ã栨Â
15 hours ago
Possible duplicate: Is C++11 available in Visual Studio 2017?
â ÃÂìýÃÂñ á¿¥Ã栨Â
15 hours ago
2
You should build with/std:c++17
and/permissive-
for example.
â VTT
15 hours ago
1
Don't trust__cplusplus
. VS2017 supports C++17 just fine - you just need to pass the correct commandline option(s) to enable it.
â Jesper Juhl
12 hours ago
5
Possible duplicate of Visual Studio 2012 __cplusplus and C++ 11
â user202729
12 hours ago
 |Â
show 1 more comment
up vote
24
down vote
favorite
up vote
24
down vote
favorite
Yesterday I upgraded to the latest VS Community 2017 (the previous one was installed last year) and wanted to check the C++ standard. So I run the following code that checks it, and as it turns out, I have C++98:
#include<iostream>
using namespace std;
int main()
cout << __cplusplus << endl;
system("pause");
Which outputs
199711
Why don't I have the latest C++ standard?
c++ visual-studio standards
Yesterday I upgraded to the latest VS Community 2017 (the previous one was installed last year) and wanted to check the C++ standard. So I run the following code that checks it, and as it turns out, I have C++98:
#include<iostream>
using namespace std;
int main()
cout << __cplusplus << endl;
system("pause");
Which outputs
199711
Why don't I have the latest C++ standard?
c++ visual-studio standards
c++ visual-studio standards
edited 13 mins ago
Boann
35.7k1184116
35.7k1184116
asked 15 hours ago
eagleye
1441210
1441210
Try changing the related project properties.
â ÃÂìýÃÂñ á¿¥Ã栨Â
15 hours ago
Possible duplicate: Is C++11 available in Visual Studio 2017?
â ÃÂìýÃÂñ á¿¥Ã栨Â
15 hours ago
2
You should build with/std:c++17
and/permissive-
for example.
â VTT
15 hours ago
1
Don't trust__cplusplus
. VS2017 supports C++17 just fine - you just need to pass the correct commandline option(s) to enable it.
â Jesper Juhl
12 hours ago
5
Possible duplicate of Visual Studio 2012 __cplusplus and C++ 11
â user202729
12 hours ago
 |Â
show 1 more comment
Try changing the related project properties.
â ÃÂìýÃÂñ á¿¥Ã栨Â
15 hours ago
Possible duplicate: Is C++11 available in Visual Studio 2017?
â ÃÂìýÃÂñ á¿¥Ã栨Â
15 hours ago
2
You should build with/std:c++17
and/permissive-
for example.
â VTT
15 hours ago
1
Don't trust__cplusplus
. VS2017 supports C++17 just fine - you just need to pass the correct commandline option(s) to enable it.
â Jesper Juhl
12 hours ago
5
Possible duplicate of Visual Studio 2012 __cplusplus and C++ 11
â user202729
12 hours ago
Try changing the related project properties.
â ÃÂìýÃÂñ á¿¥Ã栨Â
15 hours ago
Try changing the related project properties.
â ÃÂìýÃÂñ á¿¥Ã栨Â
15 hours ago
Possible duplicate: Is C++11 available in Visual Studio 2017?
â ÃÂìýÃÂñ á¿¥Ã栨Â
15 hours ago
Possible duplicate: Is C++11 available in Visual Studio 2017?
â ÃÂìýÃÂñ á¿¥Ã栨Â
15 hours ago
2
2
You should build with
/std:c++17
and /permissive-
for example.â VTT
15 hours ago
You should build with
/std:c++17
and /permissive-
for example.â VTT
15 hours ago
1
1
Don't trust
__cplusplus
. VS2017 supports C++17 just fine - you just need to pass the correct commandline option(s) to enable it.â Jesper Juhl
12 hours ago
Don't trust
__cplusplus
. VS2017 supports C++17 just fine - you just need to pass the correct commandline option(s) to enable it.â Jesper Juhl
12 hours ago
5
5
Possible duplicate of Visual Studio 2012 __cplusplus and C++ 11
â user202729
12 hours ago
Possible duplicate of Visual Studio 2012 __cplusplus and C++ 11
â user202729
12 hours ago
 |Â
show 1 more comment
1 Answer
1
active
oldest
votes
up vote
31
down vote
accepted
The value of __cplusplus
is temporarily intentionally non-conformant by default for current versions of Visual Studio in order to avoid breaking existing code. It does not mean your compiler does not support any C++11 (or newer) features.
Quoting from MSVC now correctly reports __cplusplus:
/Zc:__cplusplus
You need to compile with the
/Zc:__cplusplus
switch to see the updated value of the__cplusplus
macro. We tried updating the macro by default and discovered that a lot of code doesnâÂÂt compile correctly when we change the value of__cplusplus
. WeâÂÂll continue to require use of the/Zc:__cplusplus
switch for all minor versions of MSVC in the 19.xx family.
success! I followed the instructions on setting /Zc:__cplusplus to enabled and I see I have c++14 (201402). This is the guide for doing this: docs.microsoft.com/en-us/cpp/build/reference/â¦
â eagleye
14 hours ago
3
If the actual standard the compiler is enforcing is the focus of concern, rather than the value of that macro, you can right click on your Project in the Solution Explorer. and SelectProperties
. Then expand theC/C++
menu on the left, and choose theLanguage
submenu. There you can choose++14
,++17
, or++latest
.
â schulmaster
3 hours ago
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
31
down vote
accepted
The value of __cplusplus
is temporarily intentionally non-conformant by default for current versions of Visual Studio in order to avoid breaking existing code. It does not mean your compiler does not support any C++11 (or newer) features.
Quoting from MSVC now correctly reports __cplusplus:
/Zc:__cplusplus
You need to compile with the
/Zc:__cplusplus
switch to see the updated value of the__cplusplus
macro. We tried updating the macro by default and discovered that a lot of code doesnâÂÂt compile correctly when we change the value of__cplusplus
. WeâÂÂll continue to require use of the/Zc:__cplusplus
switch for all minor versions of MSVC in the 19.xx family.
success! I followed the instructions on setting /Zc:__cplusplus to enabled and I see I have c++14 (201402). This is the guide for doing this: docs.microsoft.com/en-us/cpp/build/reference/â¦
â eagleye
14 hours ago
3
If the actual standard the compiler is enforcing is the focus of concern, rather than the value of that macro, you can right click on your Project in the Solution Explorer. and SelectProperties
. Then expand theC/C++
menu on the left, and choose theLanguage
submenu. There you can choose++14
,++17
, or++latest
.
â schulmaster
3 hours ago
add a comment |Â
up vote
31
down vote
accepted
The value of __cplusplus
is temporarily intentionally non-conformant by default for current versions of Visual Studio in order to avoid breaking existing code. It does not mean your compiler does not support any C++11 (or newer) features.
Quoting from MSVC now correctly reports __cplusplus:
/Zc:__cplusplus
You need to compile with the
/Zc:__cplusplus
switch to see the updated value of the__cplusplus
macro. We tried updating the macro by default and discovered that a lot of code doesnâÂÂt compile correctly when we change the value of__cplusplus
. WeâÂÂll continue to require use of the/Zc:__cplusplus
switch for all minor versions of MSVC in the 19.xx family.
success! I followed the instructions on setting /Zc:__cplusplus to enabled and I see I have c++14 (201402). This is the guide for doing this: docs.microsoft.com/en-us/cpp/build/reference/â¦
â eagleye
14 hours ago
3
If the actual standard the compiler is enforcing is the focus of concern, rather than the value of that macro, you can right click on your Project in the Solution Explorer. and SelectProperties
. Then expand theC/C++
menu on the left, and choose theLanguage
submenu. There you can choose++14
,++17
, or++latest
.
â schulmaster
3 hours ago
add a comment |Â
up vote
31
down vote
accepted
up vote
31
down vote
accepted
The value of __cplusplus
is temporarily intentionally non-conformant by default for current versions of Visual Studio in order to avoid breaking existing code. It does not mean your compiler does not support any C++11 (or newer) features.
Quoting from MSVC now correctly reports __cplusplus:
/Zc:__cplusplus
You need to compile with the
/Zc:__cplusplus
switch to see the updated value of the__cplusplus
macro. We tried updating the macro by default and discovered that a lot of code doesnâÂÂt compile correctly when we change the value of__cplusplus
. WeâÂÂll continue to require use of the/Zc:__cplusplus
switch for all minor versions of MSVC in the 19.xx family.
The value of __cplusplus
is temporarily intentionally non-conformant by default for current versions of Visual Studio in order to avoid breaking existing code. It does not mean your compiler does not support any C++11 (or newer) features.
Quoting from MSVC now correctly reports __cplusplus:
/Zc:__cplusplus
You need to compile with the
/Zc:__cplusplus
switch to see the updated value of the__cplusplus
macro. We tried updating the macro by default and discovered that a lot of code doesnâÂÂt compile correctly when we change the value of__cplusplus
. WeâÂÂll continue to require use of the/Zc:__cplusplus
switch for all minor versions of MSVC in the 19.xx family.
answered 15 hours ago
hvd
113k11194272
113k11194272
success! I followed the instructions on setting /Zc:__cplusplus to enabled and I see I have c++14 (201402). This is the guide for doing this: docs.microsoft.com/en-us/cpp/build/reference/â¦
â eagleye
14 hours ago
3
If the actual standard the compiler is enforcing is the focus of concern, rather than the value of that macro, you can right click on your Project in the Solution Explorer. and SelectProperties
. Then expand theC/C++
menu on the left, and choose theLanguage
submenu. There you can choose++14
,++17
, or++latest
.
â schulmaster
3 hours ago
add a comment |Â
success! I followed the instructions on setting /Zc:__cplusplus to enabled and I see I have c++14 (201402). This is the guide for doing this: docs.microsoft.com/en-us/cpp/build/reference/â¦
â eagleye
14 hours ago
3
If the actual standard the compiler is enforcing is the focus of concern, rather than the value of that macro, you can right click on your Project in the Solution Explorer. and SelectProperties
. Then expand theC/C++
menu on the left, and choose theLanguage
submenu. There you can choose++14
,++17
, or++latest
.
â schulmaster
3 hours ago
success! I followed the instructions on setting /Zc:__cplusplus to enabled and I see I have c++14 (201402). This is the guide for doing this: docs.microsoft.com/en-us/cpp/build/reference/â¦
â eagleye
14 hours ago
success! I followed the instructions on setting /Zc:__cplusplus to enabled and I see I have c++14 (201402). This is the guide for doing this: docs.microsoft.com/en-us/cpp/build/reference/â¦
â eagleye
14 hours ago
3
3
If the actual standard the compiler is enforcing is the focus of concern, rather than the value of that macro, you can right click on your Project in the Solution Explorer. and Select
Properties
. Then expand the C/C++
menu on the left, and choose the Language
submenu. There you can choose ++14
,++17
, or ++latest
.â schulmaster
3 hours ago
If the actual standard the compiler is enforcing is the focus of concern, rather than the value of that macro, you can right click on your Project in the Solution Explorer. and Select
Properties
. Then expand the C/C++
menu on the left, and choose the Language
submenu. There you can choose ++14
,++17
, or ++latest
.â schulmaster
3 hours ago
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f52465524%2fwhy-is-the-visual-studio-community-2017-c-standard-c98%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Try changing the related project properties.
â ÃÂìýÃÂñ á¿¥Ã栨Â
15 hours ago
Possible duplicate: Is C++11 available in Visual Studio 2017?
â ÃÂìýÃÂñ á¿¥Ã栨Â
15 hours ago
2
You should build with
/std:c++17
and/permissive-
for example.â VTT
15 hours ago
1
Don't trust
__cplusplus
. VS2017 supports C++17 just fine - you just need to pass the correct commandline option(s) to enable it.â Jesper Juhl
12 hours ago
5
Possible duplicate of Visual Studio 2012 __cplusplus and C++ 11
â user202729
12 hours ago