Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for template signatures #19

Open
mxmlnkn opened this issue Jul 6, 2021 · 1 comment
Open

Support for template signatures #19

mxmlnkn opened this issue Jul 6, 2021 · 1 comment

Comments

@mxmlnkn
Copy link

mxmlnkn commented Jul 6, 2021

Given this header:

template<
    typename Key,
    typename Value,
    typename CacheStrategy = CacheStrategy::LeastRecentlyUsed<Key>
>
class Cache
{};

I get this result:

@startuml
class Cache <template<typename Key, typename Value, typename CacheStrategy=CacheStrategy::LeastRecentlyUsed<Key>>> {
}
@enduml

This is rendered as:

template-signature

I would have expected something more formal UML, like here. I.e., I would expect something like:

@startuml
class Cache <Key, Value, CacheStrategy>{
}
@enduml

template-signature

I'm not sure what to do about the default value for template arguments.

@thibaultmarin
Copy link
Owner

Unfortunately, the parser returns the template specification as a string. Since this package does not have the ambition to parse c++ code, this is unlikely to get fixed until the parser returns a shortened template specification or the parsing library is changed (for instance to libclang, which offers a displayname property matching your desired output).

I can't give an estimate of when that may happen, but I will keep this in mind, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants