1#ifndef PROFILECOUNTERS_HH
2#define PROFILECOUNTERS_HH
86template<
bool ENABLED,
typename ENUM>
92 std::cout <<
"-- Profile counters: " <<
EnumTypeName<ENUM>() <<
" -- " <<
static_cast<void*
>(
this) <<
'\n';
100 ++counters[size_t(
e)];
104 static constexpr auto NUM = size_t(
ENUM::NUM);
105 mutable std::array<unsigned, NUM> counters = {};
111template<
typename ENUM>
std::ostream & operator<<(std::ostream &os, EnumTypeName< E >)=delete
constexpr auto enumerate(Iterable &&iterable)
Heavily inspired by Nathan Reed's blog post: Python-Like enumerate() In C++17 http://reedbeta....
ALWAYS_INLINE unsigned count(const uint8_t *pIn, const uint8_t *pMatch, const uint8_t *pInLimit)