CatapultServer
v0.5.0.1 (Elephant)
|
Go to the documentation of this file.
28 namespace catapult {
namespace utils {
51 out << std::setw(2 *
size) << +value;
55 static void Output(std::ostream& out,
const T& value) {
56 if constexpr (std::is_integral_v<T>) {
59 auto pData = reinterpret_cast<const uint8_t*>(&value);
60 for (
auto i = 0u; i <
sizeof(T); ++i)
70 template<
typename T,
size_t N = sizeof(T)>
88 template<
typename TInputIterator>
101 for (
auto iter = formatter.
m_begin; formatter.
m_end != iter; ++iter) {
118 template<
typename TInputIterator>
119 auto HexFormat(TInputIterator begin, TInputIterator end,
char separator = 0) {
124 template<
typename TContainer>
125 auto HexFormat(
const TContainer& container,
char separator) {
126 return HexFormat(std::cbegin(container), std::cend(container), separator);
132 if constexpr (traits::is_scalar_v<T>) {
135 auto pData = reinterpret_cast<const uint8_t*>(&data);
136 return HexFormat(pData, pData +
sizeof(T), 0);
147 template<
typename T,
size_t N>
constexpr void HexFormat(const ByteArray< N, TTag > &)
uint64_t size
Definition: MemoryCounters.cpp:65
Definition: AddressExtractionExtension.cpp:28