Details
-
Bug
-
Resolution: Duplicate
-
Not Evaluated
-
None
-
Qt Creator 4.5.0
-
None
-
Probably not relevant, but archlinux current.
Description
#include <vector> struct my_object; void f() { std::vector<my_object> objects; auto pid2p = [&objects](const my_object *o) -> entity * { return o ? &objects[reinterpret_cast<std::uintptr_t>(o) - 1] : nullptr; }; // Incorrect ident }
After the lambda definition, Ctrl-I wants to indent by two levels instead of the correct one. The lambda recreates a real pointer from an index stored in the pointer memory with a 1-offset (e.g. nullptr is invariant).
Attachments
Issue Links
- duplicates
-
QTCREATORBUG-9966 Incorrect indent for lambdas with explicit return type
-
- Closed
-