Skip to content

Unable to combine abstract and polymorphic base types #18

@N40

Description

@N40

I have an issue or a question regarding a mix of polymorphic and abstract inheritance

considering the

#pragma db object abstract
struct Traits_A

#pragma db object
struct Traits_B

#pragma db object
struct Target : Traits_A, Traits_B

yields the desired .cxx code

bind<Target> (...)
{
  // Traits_A base
  object_traits_impl< ::Traits_A, id_sqlite >::bind (b + n, i, sk);

  // Traits_B base
  object_traits_impl< ::Traits_B, id_sqlite >::bind (b + n, i, sk);

WHEREAS

#pragma db object polymorphic
struct Base

#pragma db object
struct Traits_B

#pragma db object
struct Target : Base, Traits_B

yields omitting the Traits B abstract

bind<Target> (...
{

  // Base base
  base_traits::bind (b + n, *i.base, sk);
}

Is there a rule, that inheriting from one polymorphic class omits all other inheritances on the same level?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions