rippled
Loading...
Searching...
No Matches
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
7namespace ripple {
8
15template <class T>
18{
19 return std::to_string(t);
20}
21
22inline std::string
23to_string(bool b)
24{
25 return b ? "true" : "false";
26}
27
28inline std::string
29to_string(char c)
30{
31 return std::string(1, c);
32}
33
34inline std::string
36{
37 return s;
38}
39
40inline std::string
41to_string(char const* s)
42{
43 return s;
44}
45
46} // namespace ripple
47
48#endif
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition algorithm.h:6
std::string to_string(base_uint< Bits, Tag > const &a)
Definition base_uint.h:611
T to_string(T... args)