Make constexpr BEInt<Type, 2>::operator Type() C++11-compatible

Multiple return values not permitted until C++14
This commit is contained in:
Behdad Esfahbod 2021-02-20 15:31:27 -07:00
parent c2fc2aa44c
commit e208f80449

View File

@ -113,9 +113,10 @@ struct BEInt<Type, 2>
#else /* __BYTE_ORDER == __BIG_ENDIAN */
return ((packed_uint16_t *) this)->v;
#endif
#endif
#else
return (v[0] << 8)
+ (v[1] );
#endif
}
private: uint8_t v[2];
};