Struct meta_function_descriptor< Type, Ret(*)(MaybeType, Args...)>

Synopsis

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

template<typename Type, typename Ret, typename MaybeType, typename... Args>
struct meta_function_descriptor<Type, Ret (*)(MaybeType, Args...)>

Description

Meta function descriptor.

Template Parameters

Type - Reflected type to which the meta function is associated.

Ret - Function return type.

MaybeType - First function argument.

Args - Other function arguments.

Source

Lines 86-97 in src/entt/meta/utility.hpp.

template<typename Type, typename Ret, typename MaybeType, typename... Args>
struct meta_function_descriptor<Type, Ret (*)(MaybeType, Args...)> {
    /*! @brief Meta function return type. */
    using return_type = Ret;
    /*! @brief Meta function arguments. */
    using args_type = std::conditional_t<std::is_base_of_v<std::remove_cv_t<std::remove_reference_t<MaybeType>>, Type>, type_list<Args...>, type_list<MaybeType, Args...>>;

    /*! @brief True if the meta function is const, false otherwise. */
    static constexpr auto is_const = std::is_base_of_v<std::remove_cv_t<std::remove_reference_t<MaybeType>>, Type> && std::is_const_v<std::remove_reference_t<MaybeType>>;
    /*! @brief True if the meta function is static, false otherwise. */
    static constexpr auto is_static = !std::is_base_of_v<std::remove_cv_t<std::remove_reference_t<MaybeType>>, Type>;
};





Add Discussion

Log in to comment