=begin pod :kind("Type") :subkind("role") :category("metamodel")

=TITLE role Metamodel::RoleContainer

=SUBTITLE Metaobject that supports holding/containing roles

    role Metamodel::RoleContainer {}

I<Warning>: this role is part of the Rakudo implementation, and is not
a part of the language specification.

Implements the ability to hold roles to be held for composition.

=for code :preamble<role SomeRole {}>
class A does SomeRole {}

roughly corresponds to

=for code :preamble<role SomeRole {}>
class A {
    BEGIN A.^add_role(SomeRole);
}

=head1 Methods

=head2 method add_role

    method add_role($obj, Mu $role)

Adds the C<$role> to the list of roles to be composed.

=head2 method roles_to_compose

    method roles_to_compose($obj --> List:D)

returns a list of roles added with C<add_role>, which are to be composed
at type composition time.

=end pod
