diff options
author | Jeffrey Walton <noloader@gmail.com> | 2019-01-01 17:56:26 -0500 |
---|---|---|
committer | Jeffrey Walton <noloader@gmail.com> | 2019-01-01 17:56:26 -0500 |
commit | e5085684efe71cb48ccb4385f40cd3cc62d5f66c (patch) | |
tree | 747abe9fc4fa6a66650ea09322bfcef4c7dab77e /secblock.h | |
parent | 148a5e917bc277572637c8b851b9d4f1417946f7 (diff) | |
download | cryptopp-git-e5085684efe71cb48ccb4385f40cd3cc62d5f66c.tar.gz |
Fix missing SunCC Allocator::max_size(size_type) member function (GH #770)
Diffstat (limited to 'secblock.h')
-rw-r--r-- | secblock.h | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -71,6 +71,12 @@ public: /// to optimize it well in either form.
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)
/// \brief Constructs a new V using variadic arguments
|