Small patch for adding C++11 custom string literals to kdevelop background parser

François-Marie de Jouvencel at
Tue Dec 20 13:37:59 UTC 2011

Oops I'm sorry, forgot to clean up some debug code I had put in, here is a
better version.

2011/12/20 François-Marie de Jouvencel < at>

> Hello everyone, and thanks for the great work!
> I was missing support for C++11 custom string literals : that is, strings
> like "hello"_world are valid in C++11 (provided you define  : some_type
> operator"" _world(const char * str, size_t num_chars) , but I'm sure you
> know this already). So I struggled with the code and finally came up with a
> small patch (a few lines, really, in lexer.cpp) to do the trick. So far I
> haven't noticed any negative side effects (besides, of course, not
> detecting errors in C++03 when custom literals are used, but I don't think
> its a huge problem), so I guess I didnt break anything and I submit it to
> you.
> The patch was created using the command : git diff --no-prefix >
> add_custom_string_literals.patch  , please tell me if that's not the right
> way to proceed.
> Best regards,
> FM
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: add_custom_string_literals.patch
Type: text/x-patch
Size: 1220 bytes
Desc: not available
URL: <>

More information about the KDevelop-devel mailing list