summaryrefslogtreecommitdiff
path: root/src/string.hh
diff options
context:
space:
mode:
authorMaxime Coste <frrrwww@gmail.com>2015-06-22 13:56:00 +0100
committerMaxime Coste <frrrwww@gmail.com>2015-06-22 13:56:00 +0100
commit68708953744b9e98d78cd28e1904af4f9c16d1e0 (patch)
treeafe435034c6d4d69ee28c5f23e402527a38aa010 /src/string.hh
parent7e6b02f26a00bf58a638e50841915dcd33cadcc6 (diff)
Add support for hex formatting
Diffstat (limited to 'src/string.hh')
-rw-r--r--src/string.hh4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/string.hh b/src/string.hh
index 5d3855f1..424e994c 100644
--- a/src/string.hh
+++ b/src/string.hh
@@ -270,8 +270,12 @@ struct InplaceString
char m_data[N];
};
+struct Hex { size_t val; };
+inline Hex hex(size_t val) { return {val}; }
+
InplaceString<16> to_string(int val);
InplaceString<24> to_string(size_t val);
+InplaceString<24> to_string(Hex val);
InplaceString<24> to_string(float val);
template<typename RealType, typename ValueType>