jeff-hykin / better-cpp-syntax

💾 The source of VS Code's C++ syntax highlighting
GNU General Public License v3.0
155 stars 30 forks source link

parentheses getting different scopes again #523

Open mxdh opened 4 years ago

mxdh commented 4 years ago

Checklist

The code with a problem is:

#include <algorithm>
#include <functional>
#include <iostream>
#include <type_traits>
#include <utility>

template <typename _Tp>
concept number = requires {
  requires(
      std::is_same_v<_Tp, std::remove_reference<decltype(
                              std::declval<_Tp>() + std::declval<_Tp>())> >);
};

int main() {
  static_assert(std::is_same_v<int, decltype(1 + 1)>);
  std::cout << "int is a number: " << number<int> << std::endl;
  std::cout << "pointer is a number: " << number<void*> << std::endl;
}

It looks like:

屏幕截图 2020-11-24 221500

Cold Horizon

It should look like:

Sorry,I'm not good at English. I think each pair of parentheses should match each other.