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

Problem parsing std::function member #18

Open
mxmlnkn opened this issue Jul 6, 2021 · 2 comments
Open

Problem parsing std::function member #18

mxmlnkn opened this issue Jul 6, 2021 · 2 comments

Comments

@mxmlnkn
Copy link

mxmlnkn commented Jul 6, 2021

Given this input header:

#pragma once

#include <functional>
#include <memory>


class Foo
{
    std::function<std::shared_ptr<BlockFinder>(void)> const m_startBlockFinder;
    std::shared_ptr<BlockFinder> m_blockFinder;
};

and parsing it with:

hpp2plantuml -i hpp2uml-bracket-bug.hpp

I get (shortened for brevity):

@startuml
class Foo {
	->() : std::function<std::shared_ptr<BlockFinder {query}
	-m_blockFinder : std::shared_ptr<BlockFinder>
}
@enduml

It looks like m_startBlockFinder got interpreted as a method with name > instead of being recognized as a member.

@thibaultmarin
Copy link
Owner

The robotpy-cppheaderparser package, which is used to parse the headers, indeed parses the member function as a method (with a wrong name). Maybe this could be reported upstream.

@mxmlnkn
Copy link
Author

mxmlnkn commented Jul 10, 2021

I see. Thanks for investigating. I think reporting it upstream would be the best choice.

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