#pragma once typedef std::vector bytes_vector; template void pushValue(bytes_vector& vBytes, const T& value) { for (int i = sizeof(value) - 1; i >= 0; i--) { const unsigned char byte = (value >> (i * CHAR_BIT)) & 0xFF; vBytes.push_back(byte); } }