admin管理员组文章数量:1356815
Error image
The error code
#include <concepts>
#include <iostream>
using namespace std;
template <std::integral T>
void print(T i)
{
std::cout << "Integral: " << i << '\n';
}
int main()
{
print (1);
}
I use Vundle to install vim plugin, here is some related setting.
Plugin 'ycm-core/YouCompleteMe'
let g:ycm_clangd_binary_path = '/usr/bin/clangd'
let g:ycm_global_ycm_extra_conf = '/home/hlajungo/.vim/bundle/YouCompleteMe/.ycm_extra_conf.py'
Error image
The error code
#include <concepts>
#include <iostream>
using namespace std;
template <std::integral T>
void print(T i)
{
std::cout << "Integral: " << i << '\n';
}
int main()
{
print (1);
}
I use Vundle to install vim plugin, here is some related setting.
Plugin 'ycm-core/YouCompleteMe'
let g:ycm_clangd_binary_path = '/usr/bin/clangd'
let g:ycm_global_ycm_extra_conf = '/home/hlajungo/.vim/bundle/YouCompleteMe/.ycm_extra_conf.py'
Share
Improve this question
edited Mar 29 at 19:17
趴蒽翔
asked Mar 27 at 19:48
趴蒽翔趴蒽翔
273 bronze badges
3
- Use the plugin's support channels. – romainl Commented Mar 27 at 22:00
- stackoverflow/help/minimal-reproducible-example – svlasov Commented Mar 28 at 12:44
- I remove the prim example, and add the minimal example, and in some further more searching in youcompleteme github, the problem solving is simple. – 趴蒽翔 Commented Mar 29 at 18:58
1 Answer
Reset to default 1Setting a file at ~/.vim/bundle/YouCompleteMe/.ycm_extra_conf.py
import os
import ycm_core
flags = [ '-std=c++20' ]
def Settings ( **kwargs ):
return { 'flags': flags }
And the problem solved.
本文标签: linuxHow to prevent YCM from showing red errors in C 20 templatesStack Overflow
版权声明:本文标题:linux - How to prevent YCM from showing red errors in C++ 20 templates? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744070674a2585824.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论