Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 22 additions & 3 deletions config_ver.h
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,28 @@
# define CRYPTOPP_INTEL_VERSION (__INTEL_COMPILER)
#endif

#if defined(_MSC_VER) && !defined(__clang__)
# undef CRYPTOPP_LLVM_CLANG_VERSION
# define CRYPTOPP_MSC_VERSION (_MSC_VER)
#if defined(_MSC_VER)
#include <yvals_core.h> // needed for _MSVC_STL_VERSION
# if !defined(__clang__)
# undef CRYPTOPP_LLVM_CLANG_VERSION
# define CRYPTOPP_MSC_VERSION (_MSC_VER)
# endif
#endif

#if defined(_MSVC_STL_VERSION) // VS2017 (14.1) and above
# define CRYPTOPP_MSSTL_VERSION _MSVC_STL_VERSION
#elif defined(_CPPLIB_VER) && _CPPLIB_VER >= 650 // VS2015 (14.0)
# define CRYPTOPP_MSSTL_VERSION 140
#elif defined(_CPPLIB_VER) && _CPPLIB_VER >= 610 // VS2013 (12.0)
# define CRYPTOPP_MSSTL_VERSION 120
#elif defined(_CPPLIB_VER) && _CPPLIB_VER >= 540 // VS2012 (11.0)
# define CRYPTOPP_MSSTL_VERSION 110
#elif defined(_CPPLIB_VER) && _CPPLIB_VER >= 520 // VS2010 (10.0)
# define CRYPTOPP_MSSTL_VERSION 100
#elif defined(_CPPLIB_VER) && _CPPLIB_VER >= 505 // VS2008SP1 (9.0)
# define CRYPTOPP_MSSTL_VERSION 91
#elif defined(_CPPLIB_VER) && _CPPLIB_VER >= 503 // VS2008 (also 9.0)
# define CRYPTOPP_MSSTL_VERSION 90
#endif

// To control <x86intrin.h> include. May need a guard, like GCC 4.5 and above
Expand Down
4 changes: 2 additions & 2 deletions secblock.h
Original file line number Diff line number Diff line change
Expand Up @@ -269,8 +269,8 @@ class AllocatorWithCleanup : public AllocatorBase<T>
/// store elements in the list.
/// \details VS.NET STL enforces the policy of "All STL-compliant allocators
/// have to provide a template class member called rebind".
template <class V> struct rebind { typedef AllocatorWithCleanup<V, T_Align16> other; };
#if (CRYPTOPP_MSC_VERSION >= 1500)
template <class V> struct rebind { typedef AllocatorWithCleanup<V, T_Align16> other; };
#if (CRYPTOPP_MSSTL_VERSION >= 90)
AllocatorWithCleanup() {}
template <class V, bool A> AllocatorWithCleanup(const AllocatorWithCleanup<V, A> &) {}
#endif
Expand Down