Struct fixed_sequence_container

Synopsis

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

template<typename Container>
struct fixed_sequence_container

Description

STL-compatible fixed sequence container traits.

Template Parameters

Container - The type of the container.

Methods

clearDoes nothing.
eraseDoes nothing.
insertDoes nothing.
resizeDoes nothing.

Source

Lines 230-265 in src/entt/meta/container.hpp.

template<typename Container>
struct fixed_sequence_container {
    /**
     * @brief Does nothing.
     * @return False to indicate failure in all cases.
     */
    [[nodiscard]] static bool resize(const Container &, typename Container::size_type) {
        return false;
    }

    /**
     * @brief Does nothing.
     * @return False to indicate failure in all cases.
     */
    [[nodiscard]] static bool clear(const Container &) {
        return false;
    }

    /**
     * @brief Does nothing.
     * @return A pair consisting of an invalid iterator and a false value to
     * indicate failure in all cases.
     */
    [[nodiscard]] static std::pair<typename Container::iterator, bool> insert(const Container &, typename Container::iterator, const typename Container::value_type &) {
        return { {}, false };
    }

    /**
     * @brief Does nothing.
     * @return A pair consisting of an invalid iterator and a false value to
     * indicate failure in all cases.
     */
    [[nodiscard]] static std::pair<typename Container::iterator, bool> erase(const Container &, typename Container::iterator) {
        return { {}, false };
    }
};





Add Discussion

Log in to comment