Generated visual studio solution and projects give intellisense warnings for C++17 features
Categories
(Firefox Build System :: General, defect, P3)
Tracking
(firefox95 fixed)
| Tracking | Status | |
|---|---|---|
| firefox95 | --- | fixed |
People
(Reporter: bryce, Assigned: ahochheiden)
Details
Attachments
(1 file)
When working with the generated VisualStudio files for mozilla-central, VisualStudio seems to prefer the C++14 standard for intellisense. This results in it generating warnings and red squigglies for things like
- std library features only available in C++17
- nested name spaces, e.g.
namspace mozilla::media inlineusage on variables
This isn't a big problem, but it would be nice to have VisualStudio recognize C++17 code.
If I create a solution in VisualStudio 2019 I can navigate to the Properties -> General page for the solution and change the standard version used. However this isn't available for my Moz generated projects.
FWIW, toggling the standard version on a project seems to set something like the following in the project file
<LanguageStandard>stdcpp17</LanguageStandard>
Is it possible to set the standard in the generated files?
Updated•4 years ago
|
| Assignee | ||
Updated•4 years ago
|
| Assignee | ||
Comment 1•4 years ago
|
||
| Assignee | ||
Comment 2•4 years ago
•
|
||
Adding the <LanguageStandard> field and playing around with the values did not work for me.
Adding /std:c++17 to <AdditionalOptions> under the NMake project properties made IntelliSense use C++17 for my testing. (No red squiggles warnings for C++17 style nested namespaces eg: namspace mozilla::media{};)
I've submitted a patch that adds the /std:c++17 value for <AdditionalOptions> on VS Project Generation.
Updated•4 years ago
|
Updated•4 years ago
|
Comment 4•4 years ago
|
||
| bugherder | ||
Description
•