diff --git a/src/plugins/cpptools/cppcodecompletion.cpp b/src/plugins/cpptools/cppcodecompletion.cpp
index 8b7f59de17a1d0f290d6c316b5df979c3b9db9c5..9c54d4969d39ef0d2cd8d72516e538aa6400afbc 100644
--- a/src/plugins/cpptools/cppcodecompletion.cpp
+++ b/src/plugins/cpptools/cppcodecompletion.cpp
@@ -437,7 +437,7 @@ static int startOfOperator(TextEditor::ITextEditable *editor,
     } else if (wantFunctionCall        && ch == QLatin1Char('(')) {
         k = T_LPAREN;
         --start;
-    } else if (ch2 == QLatin1Char(':') && ch == QLatin1Char(':')) {
+    } else if (ch3 != QLatin1Char(':') && ch2 == QLatin1Char(':') && ch == QLatin1Char(':')) {
         k = T_COLON_COLON;
         start -= 2;
     } else if (ch2 == QLatin1Char('-') && ch == QLatin1Char('>')) {