rippled
Loading...
Searching...
No Matches
include
xrpl
basics
ToString.h
1
#ifndef XRPL_BASICS_TOSTRING_H_INCLUDED
2
#define XRPL_BASICS_TOSTRING_H_INCLUDED
3
4
#include <
string
>
5
#include <
type_traits
>
6
7
namespace
ripple
{
8
15
template
<
class
T>
16
typename
std::enable_if<std::is_arithmetic<T>::value
,
std::string
>::type
17
to_string
(T t)
18
{
19
return
std::to_string
(t);
20
}
21
22
inline
std::string
23
to_string
(
bool
b)
24
{
25
return
b ?
"true"
:
"false"
;
26
}
27
28
inline
std::string
29
to_string
(
char
c)
30
{
31
return
std::string
(1, c);
32
}
33
34
inline
std::string
35
to_string
(
std::string
s)
36
{
37
return
s;
38
}
39
40
inline
std::string
41
to_string
(
char
const
* s)
42
{
43
return
s;
44
}
45
46
}
// namespace ripple
47
48
#endif
std::string
std::enable_if
ripple
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition
algorithm.h:6
ripple::to_string
std::string to_string(base_uint< Bits, Tag > const &a)
Definition
base_uint.h:611
string
std::to_string
T to_string(T... args)
type_traits
Generated by
1.9.8