File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1395,12 +1395,18 @@ const Library::Container* Library::detectContainerInternal(const Token* const ty
13951395 break ;
13961396 }
13971397
1398+ const bool hasScope = typeStart->strAt (1 ) == " ::" ;
1399+
13981400 for (const std::pair<const std::string, Library::Container> & c : mData ->mContainers ) {
13991401 const Container& container = c.second ;
14001402 if (container.startPattern .empty ())
14011403 continue ;
14021404
1403- const int offset = (withoutStd && startsWith (container.startPattern2 , " std :: " )) ? 7 : 0 ;
1405+ const bool startsWithStd = startsWith (container.startPattern2 , " std :: " );
1406+ if (startsWithStd && !withoutStd && !hasScope)
1407+ continue ;
1408+
1409+ const int offset = (withoutStd && startsWithStd) ? 7 : 0 ;
14041410
14051411 // If endPattern is undefined, it will always match, but itEndPattern has to be defined.
14061412 if (detect != IteratorOnly && container.endPattern .empty ()) {
You can’t perform that action at this time.
0 commit comments