1 #ifndef ENTT_CORE_UTILITY_HPP
2 #define ENTT_CORE_UTILITY_HPP
6 #include "../config/config.h"
21 [[nodiscard]] constexpr Type &&
operator()(Type &&value)
const ENTT_NOEXCEPT {
22 return std::forward<Type>(value);
34 template<
typename Type,
typename Class>
35 [[nodiscard]] constexpr
auto overload(Type Class:: *member) ENTT_NOEXCEPT {
return member; }
44 template<
typename Func>
45 [[nodiscard]] constexpr
auto overload(Func *func) ENTT_NOEXCEPT {
return func; }
52 template<
class... Func>
54 using Func::operator()...;
62 template<
class... Func>
77 func{std::move(recursive)}
86 template <
class... Args>
87 decltype(
auto) operator()(Args &&... args)
const {
88 return func(*
this, std::forward<Args>(args)...);
92 template <
class... Args>
93 decltype(
auto) operator()(Args &&... args) {
94 return func(*
this, std::forward<Args>(args)...);