examples/cpp/queries/sorting/src/main.cpp
// Order by x member of Position */
Order by x member of Position
Order by x member of Position
int compare_position(
    flecs::entity_t e1,
    const Position *p1,
    flecs::entity_t e2,
    const Position *p2)
{
    (void)e1;
    (void)e2;
    return (p1->x > p2->x) - (p1->x < p2->x);
}
int compare_position ( flecs :: entity_t e1 , const Position * p1 , flecs :: entity_t e2 , const Position * p2 ) { ( void ) e1 ; ( void ) e2 ; return ( p1 -> x > p2 -> x ) - ( p1 -> x < p2 -> x ) ; }
Order by x member of Position
Order by x member of Position