From 16df6e64a8d026d3369b2fc93572fce7505a9cef Mon Sep 17 00:00:00 2001 From: Jeffrey Walton Date: Mon, 6 Jun 2016 23:57:46 -0400 Subject: [PATCH] Add hack to pickup C++11 alignas --- config.h | 6 ++++++ config.recommend | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/config.h b/config.h index 486534d6..d502437d 100644 --- a/config.h +++ b/config.h @@ -829,6 +829,12 @@ NAMESPACE_END # define CRYPTOPP_NO_THROW #endif // CRYPTOPP_CXX11_NOEXCEPT +// Hack... CRYPTOPP_ALIGN_DATA is defined earlier, before C++11 alignas availability is determined +#if defined(CRYPTOPP_CXX11_ALIGNAS) +# undef CRYPTOPP_ALIGN_DATA +# define CRYPTOPP_ALIGN_DATA(x) alignas(x) +#endif // CRYPTOPP_CXX11_ALIGNAS + // OK to comment the following out, but please report it so we can fix it. #if (defined(__cplusplus) && (__cplusplus >= 199711L)) && !defined(CRYPTOPP_UNCAUGHT_EXCEPTION_AVAILABLE) # error "std::uncaught_exception is not available. This is likely a configuration error." diff --git a/config.recommend b/config.recommend index 66421a73..be30f54d 100644 --- a/config.recommend +++ b/config.recommend @@ -827,6 +827,12 @@ NAMESPACE_END # define CRYPTOPP_NO_THROW #endif // CRYPTOPP_CXX11_NOEXCEPT +// Hack... CRYPTOPP_ALIGN_DATA is defined earlier, before C++11 alignas availability is determined +#if defined(CRYPTOPP_CXX11_ALIGNAS) +# undef CRYPTOPP_ALIGN_DATA +# define CRYPTOPP_ALIGN_DATA(x) alignas(x) +#endif // CRYPTOPP_CXX11_ALIGNAS + // OK to comment the following out, but please report it so we can fix it. #if (defined(__cplusplus) && (__cplusplus >= 199711L)) && !defined(CRYPTOPP_UNCAUGHT_EXCEPTION_AVAILABLE) # error "std::uncaught_exception is not available. This is likely a configuration error."