Fix missing SunCC Allocator::max_size(size_type) member function (GH #770)
parent
148a5e917b
commit
e5085684ef
|
|
@ -47,7 +47,7 @@ using CryptoPP::byte;
|
||||||
using CryptoPP::word32;
|
using CryptoPP::word32;
|
||||||
|
|
||||||
inline byte ARIA_BRF(const word32 x, const int y) {
|
inline byte ARIA_BRF(const word32 x, const int y) {
|
||||||
return GETBYTE(x, y);
|
return static_cast<byte>(GETBYTE(x, y));
|
||||||
}
|
}
|
||||||
|
|
||||||
ANONYMOUS_NAMESPACE_END
|
ANONYMOUS_NAMESPACE_END
|
||||||
|
|
|
||||||
|
|
@ -71,6 +71,12 @@ public:
|
||||||
/// to optimize it well in either form.
|
/// to optimize it well in either form.
|
||||||
CRYPTOPP_CONSTEXPR size_type max_size() const {return ELEMS_MAX;}
|
CRYPTOPP_CONSTEXPR size_type max_size() const {return ELEMS_MAX;}
|
||||||
|
|
||||||
|
#if defined(__SUNPRO_CC)
|
||||||
|
// https://github.com/weidai11/cryptopp/issues/770
|
||||||
|
// and https://stackoverflow.com/q/53999461/608639
|
||||||
|
CRYPTOPP_CONSTEXPR size_type max_size(size_type n) const {return (~(size_type)0)/n;}
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(CRYPTOPP_CXX11_VARIADIC_TEMPLATES) || defined(CRYPTOPP_DOXYGEN_PROCESSING)
|
#if defined(CRYPTOPP_CXX11_VARIADIC_TEMPLATES) || defined(CRYPTOPP_DOXYGEN_PROCESSING)
|
||||||
|
|
||||||
/// \brief Constructs a new V using variadic arguments
|
/// \brief Constructs a new V using variadic arguments
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue