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
cget | Returns a reference to the element at the specified location of the given container (no bounds checking is performed). | |
get | Returns a reference to the element at the specified location of the given container (no bounds checking is performed). |
Source
Lines 159-176 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];
}
/*! @copydoc get */
[[nodiscard]] static const typename Container::value_type & cget(const Container &cont, typename Container::size_type pos) {
return cont[pos];
}
};