MCPcopy Create free account
hub / github.com/GameTechDev/PresentMon / DispatchEnumValue

Function DispatchEnumValue

IntelPresentMon/CommonUtilities/Meta.h:158–166  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

156
157 template<typename Enum, std::underlying_type_t<Enum> MaxValue, typename Functor, typename ReturnT>
158 constexpr std::remove_reference_t<ReturnT> DispatchEnumValue(Enum value, Functor&& func, ReturnT&& defaultValue)
159 {
160 using Ret = std::remove_reference_t<ReturnT>;
161 auto& fn = func;
162 Ret defaultValueCopy = std::forward<ReturnT>(defaultValue);
163 return impl::DispatchEnumValueRecursive_<Enum, MaxValue, 0>(
164 static_cast<std::underlying_type_t<Enum>>(value),
165 fn, std::move(defaultValueCopy));
166 }
167}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected