Function overload

Summary

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

(1) template <typename Type, typename Class>
    constexpr auto overload(Type Class::*member) noexcept

(2) template <typename Func>
    constexpr auto overload(Func *func) noexcept

Function overload

Synopsis

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

template <typename Type, typename Class>
constexpr auto overload(Type Class::*member) noexcept

Description

Constant utility to disambiguate overloaded members of a class.

Template Parameters:

Type - Type of the desired overload.

Class - Type of class to which the member belongs.

Parameters:

member - A valid pointer to a member.

Return
Pointer to the member.

Mentioned in

Source

Lines 34-35 in src/entt/core/utility.hpp.

template<typename Type, typename Class>
[[nodiscard]] constexpr auto overload(Type Class:: *member) ENTT_NOEXCEPT { return member; }

Synopsis

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

template <typename Func>
constexpr auto overload(Func *func) noexcept

Description

Constant utility to disambiguate overloaded functions.

Template Parameters:

Func - Function type of the desired overload.

Parameters:

func - A valid pointer to a function.

Return
Pointer to the function.

Mentioned in

Source

Lines 44-45 in src/entt/core/utility.hpp.

template<typename Func>
[[nodiscard]] constexpr auto overload(Func *func) ENTT_NOEXCEPT { return func; }





Add Discussion

Log in to comment