Beluga named requirements: Particle

What an implementation of a particle in Beluga should provide.

Requirements

P is a Particle type if given:

  • An instance p of P.

  • A possibly const instance cp of P.

The following is satisfied:

Notes

Both beluga::state and beluga::weight are customization point objects. Users have two customization alternatives:

  • Specifying state() and weight() as instance members of their custom type.

  • Creating free functions state(p) and weight(p) overloaded for their custom type in the same namespace where that type is defined (so it can be found by ADL).