better-cpp-syntax icon indicating copy to clipboard operation
better-cpp-syntax copied to clipboard

Variable template incorrectly recognized as comparison operator

Open jgcodes2020 opened this issue 2 years ago • 0 comments

Checklist

  • [x] This problem exists even with the setting "C_Cpp.enhancedColorization": "Disabled"

The code with a problem is:

#include <iostream>

template <bool T>
constexpr bool var_template = T;

template <bool T>
struct obj_template {
  static constexpr bool value = T;
};

int main() {
  std::cout << var_template<true> << obj_template<true>::value;
}

It looks like:

image with the One Monokai theme

It should look like:

The < and > tokens next to var_template in var_template<true> should get the punctuation.section.angle-brackets.begin.template.call.cpp and punctuation.section.angle-brackets.end.template.call.cpp scopes respectively.

They don't.

jgcodes2020 avatar Dec 16 '21 02:12 jgcodes2020