私は最近ブーストを使い始めたかなり初心者のプログラマーです。ライブラリを cmake と正常にリンクした後、構文エラーを強調表示するのに優れた機能を果たしている私の vim (シンタスティック プラグインだと思います) に気付きました。しかし、ブースト ライブラリを含め始めて以来、 #include ステートメントで (no such file / directory ) で停止し、ファイルの残りの部分に構文エラーがまったく表示されません。あらゆる場所を検索しましたが、コンパイル段階の前に不適切なコードを構文チェックできる回避策を見つけることができません。どんな助けでも大歓迎です。スクリーンショットを投稿することはできませんが (評価が低すぎます)、価値のあるものは何でもコードを投稿します
#include <iostream>
#include <boost/regex.hpp> <--------------syntax error (though it compiles fine)
#include <algorithm>
using namespace std;
void testMatch(const boost::regex& ex,const string st){
cout<<"Matching" <<st <<endl;
if(boost::regex_match(ex,st)){
cout<<"matches"<<endl
}
else cout<<"oops"; }
void testSearch(const boost::regex& ex, const string st){
cout<<"Searching"<<endl;
}