diff --git a/src/sharedarray.cpp b/src/sharedarray.cpp index 7bc693b..7837a21 100644 --- a/src/sharedarray.cpp +++ b/src/sharedarray.cpp @@ -65,6 +65,14 @@ size_t elementSize(ArrayType type) namespace detail { namespace { + +template +struct Print { static inline const E& as(const E& val) { return val; } }; +template<> +struct Print { static inline int as(int8_t val) { return val; } }; +template<> +struct Print { static inline unsigned as(uint8_t val) { return val; } }; + template void showArr(std::ostream& strm, const void* raw, size_t count, size_t limit) { @@ -81,7 +89,7 @@ void showArr(std::ostream& strm, const void* raw, size_t count, size_t limit) strm<<"..."; break; } - strm<::as(base[i]); } strm<<']'; }