Struct dynamic_associative_key_only_container

Synopsis

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

template<typename Container>
struct dynamic_associative_key_only_container

Description

STL-compatible dynamic associative key-only container traits.

Template Parameters

Container - The type of the container.

Methods

insertInserts an element into the given container.

Source

Lines 151-162 in src/entt/meta/container.hpp.

template<typename Container>
struct dynamic_associative_key_only_container {
    /**
     * @brief Inserts an element into the given container.
     * @param cont The container in which to insert the element.
     * @param key The element to insert.
     * @return A bool denoting whether the insertion took place.
     */
    [[nodiscard]] static bool insert(Container &cont, const typename Container::key_type &key) {
        return cont.insert(key).second;
    }
};





Add Discussion

Log in to comment