Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I've downloaded and built clang version 3.0 in order to play around a bit with C++11 features, however I get this error (even though I am using the -Wc++11-extensions flag).

S:llvmcode>clang++.exe -Wc++11-extensions variadic.cpp
variadic.cpp:4:19: warning: variadic templates are a C++11 extension [-Wc++11-extensions]
template <typename... Args>

I've built clang with VS10 on Windows 7 (64bit) and the build passed successfully.


Edit: As @cli_hlt pointed out this is a warning not an error, the error is something I did not paste unable to execute command: program not executable. The root cause for that was that link.exe was not in the PATH. Once I ran from a VS command prompt all was well.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
263 views
Welcome To Ask or Share your Answers For Others

1 Answer

You are getting a warning, not an error.

The -W switch is used to enable compiler warnings. So for my understanding, by using -Wc++11-extensions you tell the compiler to warn you if you are using C++11 extensions.

And thats exactly what happens here.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...