From 292a410f1f78f4b4b908c6dde3aab39bafe457ba Mon Sep 17 00:00:00 2001 From: Roland Conybeare Date: Sun, 28 Apr 2024 14:45:31 -0400 Subject: [PATCH] xo-indentlog: hex() explicit kword to avoid ambiguity w/ templates --- include/xo/indentlog/print/hex.hpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/xo/indentlog/print/hex.hpp b/include/xo/indentlog/print/hex.hpp index 66a34084..8f5f6f35 100644 --- a/include/xo/indentlog/print/hex.hpp +++ b/include/xo/indentlog/print/hex.hpp @@ -3,6 +3,7 @@ #pragma once #include +#include namespace xo { /** @@ -21,7 +22,7 @@ namespace xo { **/ struct hex { /** @brief constructor; create stream-inserter instance */ - hex(std::uint8_t x, bool w_char = false) : x_{x}, with_char_{w_char} {} + explicit hex(std::uint8_t x, bool w_char = false) : x_{x}, with_char_{w_char} {} /** @brief print hexadecimal byte-value on to stream. @@ -62,9 +63,8 @@ namespace xo { @param os print on this stream @param ins package for value to insert **/ - template - Stream & - operator<< (Stream & os, hex const & ins) { + inline std::iostream & + operator<< (std::iostream & os, hex const & ins) { ins.print(os); return os; }