Reputation: 675
I'm trying to build a project with clang-cl
in Visual Studio 2019 checking C++17
option in the project's properties. And I get the warning:
constexpr if is a C++17 extension [-Wc++17-extensions]
I suppose that it should appear only for code that is not compiled as C++17
. So why do I get this? Is the code compiled as C++17
?
Upvotes: 1
Views: 124
Reputation: 51884
One possibility is that you have a different Standard selected for your project and an individual source file in that project. Try checking the "Language" option in the property sheet for the 'offending' source file(s) – make sure it is also set to use the C++17 Standard.
Upvotes: 1