Implement fmt::base57

For future use
This commit is contained in:
Nekotekina 2018-03-22 22:48:38 +03:00
parent 2c6c8f1a25
commit 20785b00f6
2 changed files with 69 additions and 1 deletions

View file

@ -250,6 +250,26 @@ using fmt_args_t = const u64(&&)[sizeof...(Args) + 1];
namespace fmt
{
// Base-57 format helper
struct base57
{
const uchar* data;
std::size_t size;
template <typename T>
base57(const T& arg)
: data(reinterpret_cast<const uchar*>(&arg))
, size(sizeof(T))
{
}
base57(const uchar* data, std::size_t size)
: data(data)
, size(size)
{
}
};
template <typename... Args>
SAFE_BUFFERS FORCE_INLINE const fmt_type_info* get_type_info()
{