By heavily templated I just mean it's easy to have something like this, which is just a trivial example I just made up:
#include <type_traits>
class a {};
bool operator<(a,a) { return true; };
bool b = std::is_same_v<decltype(a{} < a{}), bool>;
// poor little orphan──┘ └──married──┘
As you can see, provided things are set up in such a way that % jumps from <
/>
to the (arguably) corresponding >
/<
, the % does jump, but between the wrong pair of angle brackets from the closing angle bracket to the less than operator.
Honestly I don't know if it's possible to distinguish between tempalate and "standalone" angle brackets without a "semantic-aware" parsing of the code, hence I'm asking the present question:
((test)
, and you press%
while on the last parenthesis, where do you expect the cursor to go? To the first one or the second one? Both would be arguably wrong or right, depending on implementation/expectation. – ChatterOne Nov 12 '20 at 8:24a
andb
can simply beint
and<<
is the bitwise operator to shift. But to be able to understand if those are classes, justint
, and if there's a custom operator defined for<<
, you need to compile the code. I don't think any plugin will ever do that. – ChatterOne Nov 12 '20 at 10:18