rippled
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
14
template
<
class
T>
15
typename
std::enable_if<std::is_arithmetic<T>::value
,
std::string
>::type
16
to_string
(T t)
17
{
18
return
std::to_string
(t);
19
}
20
21
inline
std::string
22
to_string
(
bool
b)
23
{
24
return
b ?
"true"
:
"false"
;
25
}
26
27
inline
std::string
28
to_string
(
char
c)
29
{
30
return
std::string
(1, c);
31
}
32
33
inline
std::string
34
to_string
(
std::string
s)
35
{
36
return
s;
37
}
38
39
inline
std::string
40
to_string
(
char
const
* s)
41
{
42
return
s;
43
}
44
45
}
// namespace xrpl
std::string
std::enable_if
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(base_uint< Bits, Tag > const &a)
Definition
base_uint.h:597
string
std::to_string
T to_string(T... args)
type_traits
Generated by
1.9.8