Closed georgios-vassos1 closed 5 months ago
Sorted the issue by changing call ale#Set('cpp_clangcheck_options', '')
in .vim_runtime/sources_non_forked/ale/ale_linters/cpp/clangcheck.vim
and call ale#Set('cpp_clangd_options', '')
in .vim_runtime/sources_non_forked/ale/ale_linters/cpp/clangd.vim
to call ale#Set('cpp_clangcheck_options', '-std=c++14 -Wall')
and call ale#Set('cpp_clangd_options', '-std=c++14 -Wall')
, respectively.
Issue: Error message "two_right_angle_brackets_need_space" when using C++ with vim
Description
When using C++ with vim, users encounter the error message "two_right_angle_brackets_need_space: In included file: a space is required between consecutive right angle brackets (use '> >')". This issue appears to be related to the compiler flags used by vim for generating checks, specifically the
-std
flag.Expected Behavior
Since the code actually compiles without errors when using
g++ -std=c++11 -o xx example.cpp
, vim should not prompt error messages.Actual Behavior
The error message "two_right_angle_brackets_need_space: In included file: a space is required between consecutive right angle brackets (use '> >')" is displayed.
Tried Solutions
Added the following lines to
.vim_runtime/my_configs.vim
:Modified the line
exec "!g++ % -o %<"
in.vim_runtime/vimrcs/extended.vim
toexec "!g++ % -std=c++11 -o %<"
.Code Example (example.cpp)