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

crv_object_name constructor in derived class must call super class #24

Open
voertler opened this issue Nov 29, 2023 · 0 comments
Open

Comments

@voertler
Copy link
Contributor

When creating a derived class from a crv_sequence_item a and then another class b that derives from a. It is essential to pass the crv_object_name from b to the constructor of a. Otherwise randomization fails and the constraints of b are ignored.

Is this name passing required? Can it be made it easier?

class a : public crave::crv_sequence_item
{
public:
    a(crave::crv_object_name name = "a")
    {
    }
...

class b : virtual public a
{
public:
    typedef a super_t;
    b(crave::crv_object_name name = "b")
    : super_t(name) // --> Randomization fails if object_name is not passed to constructor of base classe

Thanks to @hvdschoot for finding this 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

1 participant