I am using Fedora 19, gcc 4.8.1. My compiler supports C++11, the code compiles fine. But syntastic can't recognize C++11 code.
I set the following lines in my .vimrc,
let g:syntastic_cpp_compiler="g++"
let g:syntastic_cpp_compiler_options="-std=c++11 -stdlib=libc++"
Syntastic doesn't care about C++ standards, it just delegates the checks to your compiler, with the options you specify. You can see what syntastic does by setting g:syntastic_debug to 1:
let g:syntastic_debug = 1
(run the checker, then run :mes to see the debug messages). With your settings, the result is this:
g++ -x c++ -fsyntax-only -std=c++11 -stdlib=libc++ -I. -I.. -Iinclude -Iincludes -I../include -I../includes file.cpp
(on a side note, g:syntastic_cpp_compiler is set to g++ by default).
So, do you see different error sets when you run the checks in syntastic and when you run the above command in a terminal?
Irrespective of whatever I choose in .vimrc, checker is set to ycm & the line you mentioned is not there. Is YouCompleteMe interfering? In that case, should I post issue there?
BTW this is what I get in message:
syntastic: debug: CacheErrors: g:syntastic_aggregate_errors = 0
syntastic: debug: CacheErrors: Invoking checker: ycm
syntastic: debug: getLocList: checker cpp/ycm returned 0
Normally you should be able to choose what checkers you want to run, by setting g:syntastic_cpp_checkers. However ycm has a setting to bypass normal syntastic mechanisms, overriding your settings (or at least it used to do that; as I recall, the author considered at some point giving up that practice, as too many users found it confusing). Ycm has its own config variables, so you might try (re-)reading the ycm manual. If that doesn't help with solving your problems (either ycm not allowing syntastic to use gcc as a C++ checker, or ycm not switching to C++11 mode), then yes, you should take the issue to the ycm tracker.
This is so freaking annoying.
Why do I even have to fiddle with all these greasy vimscript config variables to support a 6 year old C++ feature. Darn.
@ulidtko Feel free to use some less greasy linter instead of syntastic. It's that easy.
Most helpful comment
@ulidtko Feel free to use some less greasy linter instead of syntastic. It's that easy.