skip extern template

This commit is contained in:
Roy Qu 2024-04-01 11:08:30 +08:00
parent 4980bd662c
commit c5b07ff321
1 changed files with 3 additions and 2 deletions

View File

@ -3569,8 +3569,9 @@ bool CppParser::handleStatement(int maxIndex)
if (keywordType == KeywordType::Extern) {
if (mIndex+1<maxIndex) {
if (mTokenizer[mIndex+1]->text=="template") {
//extern template, skit it
mIndex+=2;
//extern template, skit to ;
//see https://en.cppreference.com/w/cpp/language/class_template#Class_template_instantiation
skipNextSemicolon(mIndex, maxIndex);
goto _exit;
}
}