35 template <
typename T >
41 template <
typename T >
45 static constexpr
char hex_chars[16] = {
46 '0',
'1',
'2',
'3',
'4',
'5',
'6',
'7',
'8',
'9',
'A',
'B',
'C',
'D',
'E',
'F' };
53 auto const val = std::to_integer< uint8_t >( b );
55 w( hex_chars[val / 16] );
56 w( hex_chars[val % 16] );
63 #ifdef EMLABCPP_USE_OSTREAM
64 template < std::
size_t N >
65 inline std::ostream&
operator<<( std::ostream& os, message< N >
const& m )
77 return os << std::string_view{ m.data(), m.size() };
80 inline std::ostream&
operator<<( std::ostream& os, error_record
const& rec )
82 return os << rec.error_mark <<
'(' << rec.offset <<
')';
85 inline std::ostream&
operator<<( std::ostream& os, std::endian
const& val )
88 case std::endian::big:
89 return os <<
"big endian";
90 case std::endian::little:
91 return os <<
"little endian";
MIT License.
Definition: multiplexer.h:33
string_buffer< mark_size > mark
Definition: error.h:36
static void pretty_print_msg_format(auto &&w, msg_format< T > wrapper)
Definition: streams.h:42
T item
Definition: streams.h:38
std::ostream & operator<<(std::ostream &os, string_buffer< N > const &sb)
Definition: string_buffer.h:112
physical_quantity< 0, 0, 0, 0, 0, 0, 0, 0, 1 > byte
Definition: physical_quantity.h:118