Struct basic_sequence_container

Synopsis

#include <src/entt/meta/container.hpp>

template<typename Container>
struct basic_sequence_container

Description

Basic STL-compatible sequence container traits.

Template Parameters

Container - The type of the container.

Methods

getReturns a reference to the element at the specified location of the given container (no bounds checking is performed).

Source

Lines 132-144 in src/entt/meta/container.hpp.

template<typename Container>
struct basic_sequence_container {
    /**
     * @brief Returns a reference to the element at the specified location of the
     * given container (no bounds checking is performed).
     * @param cont The container from which to get the element.
     * @param pos The position of the element to return.
     * @return A reference to the requested element.
     */
    [[nodiscard]] static typename Container::value_type & get(Container &cont, typename Container::size_type pos) {
        return cont[pos];
    }
};





Add Discussion

Log in to comment