Skip to content

new with placement-params is not parsed #2314

@slnj

Description

@slnj

The new with pacement params ( 4th syntax at https://en.cppreference.com/w/cpp/language/new ) is not recognized.
It is used to create an object on an already allocated memory position pointed by p
::new(p)A(1,2,3);

sslr reports an error: com.sonar.sslr.api.RecognitionException: Parse error at line 1 column 2:
and sonarqube on similar code: C++ Parser can't read code. Declaration is skipped (last token=')', line=102, column=17).

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions