xrpld
Loading...
Searching...
No Matches
include
xrpl
basics
ToString.h
1
#pragma once
2
3
#include <
string
>
4
#include <
type_traits
>
5
6
namespace
xrpl
{
7
13
14
template
<
class
T>
15
std::enable_if_t<std::is_arithmetic_v<T>, std::string>
16
to_string
(T t)
// NOLINT(readability-identifier-naming)
17
{
18
return
std::to_string
(t);
19
}
20
21
inline
std::string
22
to_string
(
bool
b)
// NOLINT(readability-identifier-naming)
23
{
24
return
b ?
"true"
:
"false"
;
25
}
26
27
inline
std::string
28
to_string
(
char
c)
// NOLINT(readability-identifier-naming)
29
{
30
return
std::string
(1, c);
31
}
32
33
inline
std::string
34
to_string
(
std::string
s)
// NOLINT(readability-identifier-naming)
35
{
36
return
s;
37
}
38
39
inline
std::string
40
to_string
(
char
const
* s)
// NOLINT(readability-identifier-naming)
41
{
42
return
s;
43
}
44
45
}
// namespace xrpl
std::string
xrpl
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition
algorithm.h:5
xrpl::to_string
std::string to_string(BaseUInt< Bits, Tag > const &a)
Definition
base_uint.h:633
string
std::to_string
T to_string(T... args)
type_traits
Generated by
1.16.1