DoorKeeper/include/doorkeeper/implem/hashing.inl

16 lines
492 B
Text
Raw Normal View History

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