Details
-
Bug
-
Resolution: Duplicate
-
Not Evaluated
-
None
-
Qt Creator 3.0.0-rc1
-
None
Description
When declaring/defining templates in C++11, we can now avoid putting spaces between angle brackets. As an example, the following compiles:
template <BufferTarget Target, typename Traits = BufferTraits<Target>> class Buffer {/* cursor here */ }
Suppose the cursor is set right behind the the opening curly brace. When pressing 'Return' or 'Enter', the assumed effect is that the cursor will be placed on the following line, with the appropriate indentation relative to the opening curly brace.
Currently, however, Qt Creator will indent the cursor to a position aligned with 'Target', right after the second opening angle bracket. This is extremely annoying.
The work-around is to simply use C++03 syntax. Then the indentation is fine.
Attachments
Issue Links
- is replaced by
-
QTCREATORBUG-9199 Auto-indent fails after double template closing (>>) in a function's return type
- Closed