DoorKeeper/include/doorkeeper/implem/hashing.inl

14 lines
448 B
Text
Raw Normal View History

namespace dk {
template <typename T, uint32_t D>
HashType make_signature_hash() {
#if IS_PRETTY_FUNC_CONSTEXPR
constexpr bt::string<sizeof(__PRETTY_FUNCTION__)-1> func_pretty(__PRETTY_FUNCTION__);
return implem::hash_string(func_pretty.data(), func_pretty.size());
#else
const char* const pf = __PRETTY_FUNCTION__;
const std::size_t len = sizeof(__PRETTY_FUNCTION__) - 1;
return implem::hash_string(pf, len);
#endif
}
} //namespace dk