From 93e10f1cc40f31aa4fd10ed09a42cc9caa3bdd8c Mon Sep 17 00:00:00 2001 From: Lee Clagett Date: Thu, 9 Mar 2017 15:50:51 -0500 Subject: Simplified the implementation and features of span --- contrib/epee/src/hex.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'contrib/epee/src/hex.cpp') diff --git a/contrib/epee/src/hex.cpp b/contrib/epee/src/hex.cpp index 6a698b5a9..cfbd3cf87 100644 --- a/contrib/epee/src/hex.cpp +++ b/contrib/epee/src/hex.cpp @@ -38,7 +38,7 @@ namespace epee namespace { template - void write_hex(T&& out, const view src) + void write_hex(T&& out, const span src) { static constexpr const char hex[] = u8"0123456789abcdef"; static_assert(sizeof(hex) == 17, "bad string size"); @@ -52,7 +52,7 @@ namespace epee } } - std::string to_hex::string(const view src) + std::string to_hex::string(const span src) { if (std::numeric_limits::max() / 2 < src.size()) throw std::range_error("hex_view::to_string exceeded maximum size"); @@ -63,19 +63,19 @@ namespace epee return out; } - void to_hex::buffer(std::ostream& out, const view src) + void to_hex::buffer(std::ostream& out, const span src) { write_hex(std::ostreambuf_iterator{out}, src); } - void to_hex::formatted(std::ostream& out, const view src) + void to_hex::formatted(std::ostream& out, const span src) { out.put('<'); buffer(out, src); out.put('>'); } - void to_hex::buffer_unchecked(char* out, const view src) noexcept + void to_hex::buffer_unchecked(char* out, const span src) noexcept { return write_hex(out, src); } -- cgit v1.2.3