24 #ifndef STATICLIB_IO_HEX_SINK_HPP
25 #define STATICLIB_IO_HEX_SINK_HPP
29 #include "staticlib/config.hpp"
39 namespace hex_sink_detail {
41 const std::array<char, 16>
symbols = {{
'0',
'1',
'2',
'3',
'4',
'5',
'6',
'7',
'8',
'9',
'a',
'b',
'c',
'd',
'e',
'f'}};
48 template<
typename Sink>
57 std::array<char, 2> hbuf;
93 sink(std::move(other.sink)),
94 hbuf(std::move(other.hbuf)) { }
103 sink = std::move(other.sink);
104 hbuf = std::move(other.hbuf);
115 for (
size_t i = 0; i < span.
size(); i++) {
116 char ch = span.
data()[i];
118 unsigned char uch =
static_cast<unsigned char>(ch);
153 template <
typename Sink,
154 class =
typename std::enable_if<!std::is_lvalue_reference<Sink>::value>::type>
166 template <
typename Sink>