-
Notifications
You must be signed in to change notification settings - Fork 1.4k
C++17 fixes #591
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
C++17 fixes #591
Changes from 4 commits
b490f2e
f692ada
35469f4
da6e821
9fc549c
be8dddd
0276049
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -377,9 +377,11 @@ static void InitializeStandardPredefinedMacros(const TargetInfo &TI, | |
| else if (!LangOpts.GNUMode && LangOpts.Digraphs) | ||
| Builder.defineMacro("__STDC_VERSION__", "199409L"); | ||
| } else { | ||
| // FIXME: Use correct value for C++17. | ||
| // C++17 [cpp.predefined]p1: | ||
| // The name __cplusplus is defined to the value 201703L when compiling a | ||
| // C++ translation unit. | ||
| if (LangOpts.CPlusPlus1z) | ||
| Builder.defineMacro("__cplusplus", "201406L"); | ||
| Builder.defineMacro("__cplusplus", "201703L"); | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Don't we need to match clang value?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There is no real need. The compiler will not care as it's not using this value. Clang 3.9 which is embedded in ROOT already supported majority of C++17 features. Changing |
||
| // C++1y [cpp.predefined]p1: | ||
| // The name __cplusplus is defined to the value 201402L when compiling a | ||
| // C++ translation unit. | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, David!