ラムダ式のキャプチャ ブラケット内にペアを記述する方法を知りたいだけです。次のコードはコンパイルされないため、何か不足しています...
std::vector<std::pair<std::string, std::string>> container1_;
for( auto iter : container1_ )
{
auto result = std::find_if( container2_.cbegin(), container2_.cend(),
[iter.first]( const std::string& str )->bool { return str == iter.first; } );
}
In member function ‘bool MsgChecker::CheckKeys()’:
error: expected ‘,’ before ‘.’ token
error: expected identifier before ‘.’ token