Most of this was accomplished at
https://github.com/weidai11/cryptopp/commit/ba75834ae9b3846a19291c8c281626dd0a891779. It picked all the low hanging fruit (i.e., the easy stuff).
There's one piece remaining, and its burrowed in deeply. Early Microsoft VC++ compilers could not take enums as template parameters, so it gave rise to goodness like shown below.
I made a quick pass to see how painful it would be to remove, and it was mostly painful. It exceeded "easy" and "discomfort" levels.
Any thoughts on how to proceed?
Jeff
**********
// VC60 workaround: using enums as template parameters causes problems
//! \brief Converts an enumeration to a type suitable for use as a template parameter
template <typename ENUM_TYPE, int VALUE>
struct EnumToType
{
static ENUM_TYPE ToEnum() {return (ENUM_TYPE)VALUE;}
};
//! \brief Provides the byte ordering
//! \details Big-endian and little-endian modes are supported. Bi-endian and PDP-endian modes
//! are not supported.
enum ByteOrder {
//! \brief byte order is little-endian
LITTLE_ENDIAN_ORDER = 0,
//! \brief byte order is big-endian
BIG_ENDIAN_ORDER = 1};
//! \brief Provides a constant for LittleEndian
typedef EnumToType<ByteOrder, LITTLE_ENDIAN_ORDER> LittleEndian;
//! \brief Provides a constant for BigEndian
typedef EnumToType<ByteOrder, BIG_ENDIAN_ORDER> BigEndian;