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

Hitting the CAPACITY roof #13

Closed
DonMathi opened this issue Feb 13, 2020 · 12 comments
Closed

Hitting the CAPACITY roof #13

DonMathi opened this issue Feb 13, 2020 · 12 comments
Assignees

Comments

@DonMathi
Copy link

Hi Andrew

Next quest for you. My state machine has become so large that it complains about (line 1013)
static_assert(UNIT+(WIDTH+7)/(sizeof(Unit)*8)<=CAPACITY,"");

How do I change the CAPACITY limit?

@DonMathi
Copy link
Author

DonMathi commented Feb 13, 2020

I have somthing like this: M=Machine, H=Head, S=State, O=Orthogonal, C=Composite

M(H,
S,
O[H,
    C{H,
        S,
        S,
        O[H,
            C{H,S,S},
            C{H,S,S,S}
        ]
    },
    C{H,
        S,
        C{H,S,S},
        C{H,S,S},
        C{H,S,S},
        S
    }
],
S
)

@andrew-gresyk
Copy link
Owner

Hi Kjeld,
Looks like a bug, looking into that.

@andrew-gresyk andrew-gresyk self-assigned this Feb 13, 2020
@andrew-gresyk
Copy link
Owner

Fixed in Beta 7.3

@DonMathi
Copy link
Author

DonMathi commented Feb 14, 2020

Great, thank you

@DonMathi
Copy link
Author

DonMathi commented Feb 14, 2020

I still had some issues, but now I also #include <memory>, this helps.
Do you require some extra libs, that are not included in your machine.hpp file?

@andrew-gresyk
Copy link
Owner

Nope, HFSM doesn't have any other dependencies.
Are you saying you needed to #include <memory> to fix an HFSM2 build issue?

@DonMathi
Copy link
Author

Yes. Without it complains about new for many different things inside hfsm2.
Maybe #include <memory> is not the direct needed dependency, but it solves the problem

@andrew-gresyk
Copy link
Owner

Do you have an example I can look at?
Also, which compiler are you on?

@DonMathi
Copy link
Author

DonMathi commented Feb 17, 2020

MinGW64 version 8.1.0
Issue at line 577 in your machine.hpp

error: no matching function for call to 'operator new(sizetype, hfsm2::detail::Array<hfsm2::detail::RequestT<hfsm2::EmptyPayload>, 8>::Item*)'

  new (&_items[_count]) Item{std::move(value)};
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

@andrew-gresyk
Copy link
Owner

Interesting.
Do any of the bundled examples compile on your platform?

@andrew-gresyk
Copy link
Owner

Added #include <new> for all platforms.
Let me know if this fixes the issue.

@DonMathi
Copy link
Author

Yes, that solves the issue

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