Function back

Synopsis

#include <src/entt/entity/group.hpp>

entity_type back() const

Description

Returns the last entity of the group, if any.

Return
The last entity of the group if one exists, the null entity otherwise.

Source

Lines 758-761 in src/entt/entity/group.hpp.

[[nodiscard]] entity_type back() const {
    const auto it = rbegin();
    return it != rend() ? *it : null;
}





Add Discussion

Log in to comment