4

While using a few c++11 functions in vim I noticed that the vim plugin taglist syntastic keeps reporting errors such as 'stoi' was not declared in this scope.

So I have a few questions,

  • How do I get taglist syntastic to recognise c++11 functions?
  • Is there a way I can at least hide the error messages within vim?

Also I know I can replace c++11 specific code with standard c++ to fix the errors, but I want to find out if there is another way.


Edit: Sorry, turns out syntastic is actually responsible for the errors not taglist
Thanks for reminding me, I have too many plugins and I forget what each do

aish
  • 183
  • 2
  • 12
  • Taglist doesn't understand anything to your code. The indexing is done by ctags so you should rewrite your question to take that into consideration. And maybe do a a bit of search on your own about ctags and C++11. – romainl Feb 08 '14 at 12:27
  • This message is not emitted by `taglist`. It looks like a `gcc` message. Identify plugins that invoke `gcc` and configure them to use `-std=c++11`. – n. m. could be an AI Feb 08 '14 at 12:36
  • Did you try Googling for "syntastic c++11"? When I try, it turns up http://stackoverflow.com/questions/18158772/how-to-add-c11-support-to-syntastic-vim-plugin which might help. – benjifisher Feb 08 '14 at 15:21
  • @benjifisher Yep i just figured out the same solution as the one suggested in that post, was just editing the question with the answer, thanks – aish Feb 08 '14 at 15:37
  • you should add the solution as an answer, not as an edit of the question. – mihai Feb 09 '14 at 19:44

1 Answers1

6

After some searching on syntastic's git repo I found an easy solution,
by adding let g:syntastic_cpp_compiler_options = '-std=c++11' in to my .vimrc

Abruzzo Forte e Gentile
  • 14,423
  • 28
  • 99
  • 173
aish
  • 183
  • 2
  • 12