hpp2plantuml icon indicating copy to clipboard operation
hpp2plantuml copied to clipboard

Problem parsing brace-or-equal initializer for class members

Open KevFri opened this issue 2 years ago • 3 comments

Hello, thanks for this great tool! I found the following error while using the C++ brace-or-equal initializer

Code:

private:
  int a;
  int b{0};
  int c = {0};
  int d = 1;
};

Output:

@startuml

/' Objects '/

class A {
        -a : int
        -d : int
}

/' Inheritance relationships '/

/' Aggregation relationships '/

/' Dependency relationships '/

/' Nested objects '/

@enduml

KevFri avatar May 16 '22 15:05 KevFri

robotpy-cppheaderparser (the package which does the actual parsing) does not seem to parse these (possibly related to https://github.com/robotpy/robotpy-cppheaderparser/issues/63). I will see if we can move to cxxheaderparser which may fix that (and support other modern c++ constructs).

thibaultmarin avatar May 29 '22 05:05 thibaultmarin