Files
qt-creator/tests/auto/cplusplus/cxx11/data/userDefinedLiterals.1.cpp
Christian Kandeler 1989dbe0d7 Built-in lexer: Recognize also reserved user-defined literals
Otherwise, we trip over uses of operators from the standard
library such as std::chrono's operator"" ms(), potentially breaking
basic code navigation.
Amends 425811291d.

Fixes: QTCREATORBUG-24067
Change-Id: I3b2863ce88ee3787414e7a1acdf25f368041cdb4
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2020-05-28 08:36:56 +00:00

8 lines
194 B
C++

constexpr long double operator"" _inv(long double value) {
return 1.0 / value;
}
int main() {
auto foo = operator"" _inv(2.3);
return 12_km + 0.5_Pa + 'c'_X + "abd"_L + u"xyz"_M + 10ms;
}