Skip to content

Update default clang-format style to format "> >" correctly based on cppStandard #3578

@omer-g

Description

@omer-g

Type: LanguageService

Describe the bug

  • OS and Version: Windows 7
  • VS Code Version:
    Version: 1.33.1 (system setup)
    Commit: 51b0b28134d51361cf996d2f0a1c698247aeabd8
    Date: 2019-04-11T08:27:14.102Z
    Electron: 3.1.6
    Chrome: 66.0.3359.181
    Node.js: 10.2.0
    V8: 6.6.346.32
    OS: Windows_NT x64 6.1.7601
  • C/C++ Extension Version:
    Version 0.22.1
  • Other extensions you installed (and if the issue persists after disabling them):
  • A clear and concise description of what the bug is.
    std::vector<std::set<int> > my_vector;
    is automatically corrected to:
    std::vector<std::set<int>> my_vector;

The latter is illegal (at least before C++ 11) and throws the error:
error: '>>' should be '> >' within a nested template argument list

To Reproduce

  1. In a *.cpp file, type this line manually (not copy pasted):
    std::vector<std::set<int> > my_vector;
  2. Press enter.

Expected behavior

That the space between > > would not be removed in cases such as this.

Screenshots

Additional context

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions