how to add c++11 support to syntastic vim plugin? -


i using syntastic in c++11 project. when editing in vim, , save (:w) syntastic plugin gives me errors on every initializer list {} , each loops c++11 features it's missing.

i installed syntastic using pathogen.

here 2 examples of error getting on initializer lists , each loops (both c++11 compile fine):

error on initializer lists error on each loop

turns out c++ linter (syntax checker) of syntastic has many options can set on .vimrc (unfortunate, wish project specific, .clang_complete solution).

to enable c++11 standards , use libc++ library clang (which project using) added following lines ~/.vimrc

let g:syntastic_cpp_compiler = 'clang++' let g:syntastic_cpp_compiler_options = ' -std=c++11 -stdlib=libc++' 

it works beautifully.


Comments

Popular posts from this blog

css - Which browser returns the correct result for getBoundingClientRect of an SVG element? -

gcc - Calling fftR4() in c from assembly -

Function that returns a formatted array in VBA -