1
0
mirror of https://github.com/mfontanini/libtins synced 2026-01-27 20:24:26 +01:00

Fix C++03 build issues on PDU option

This commit is contained in:
Matias Fontanini
2017-05-21 09:16:41 -07:00
parent 49d6e42324
commit 5a3f3e43a6
2 changed files with 24 additions and 10 deletions

View File

@@ -54,6 +54,8 @@ namespace Internals {
namespace Converters {
uint8_t convert(const uint8_t* ptr, uint32_t data_size, PDU::endian_type endian,
type_to_type<uint8_t>);
int8_t convert(const uint8_t* ptr, uint32_t data_size, PDU::endian_type endian,
type_to_type<int8_t>);
uint16_t convert(const uint8_t* ptr, uint32_t data_size, PDU::endian_type endian,
type_to_type<uint16_t>);
uint32_t convert(const uint8_t* ptr, uint32_t data_size, PDU::endian_type endian,
@@ -110,6 +112,12 @@ namespace Internals {
PDUType::endianness, type);
}
template <typename U, typename X, typename PDUType>
static U do_convert(const PDUOption<X, PDUType>& opt, type_to_type<int8_t> type) {
return Converters::convert(opt.data_ptr(), opt.data_size(),
PDUType::endianness, type);
}
template <typename U, typename X, typename PDUType>
static U do_convert(const PDUOption<X, PDUType>& opt, type_to_type<uint16_t> type) {
return Converters::convert(opt.data_ptr(), opt.data_size(),