diff options
author | Jeffrey Walton <noloader@gmail.com> | 2019-02-04 07:18:51 -0500 |
---|---|---|
committer | Jeffrey Walton <noloader@gmail.com> | 2019-02-04 07:18:51 -0500 |
commit | 47435f7d7203229cff6742a9ba46cad36def07c9 (patch) | |
tree | fe9678167c3f25730bf8e8b74548591aefa841da /stdcpp.h | |
parent | 5b6b86c7f14eb576b4836541c56b7dbdab18c4d7 (diff) | |
download | cryptopp-git-47435f7d7203229cff6742a9ba46cad36def07c9.tar.gz |
Guard use of <cstddef> for Microsoft compilers (GH #781)
Diffstat (limited to 'stdcpp.h')
-rw-r--r-- | stdcpp.h | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -60,11 +60,18 @@ namespace std { #endif
#include <cstdlib>
-#include <cstddef>
#include <cstring>
#include <climits>
#include <cmath>
+// It is 2019 and VS2017/Win10 still can't compile a
+// program that includes <cstddef> without making users
+// do something special. "Epic fail" comes to mind.
+// Also see https://github.com/weidai11/cryptopp/issues/781
+#ifndef _MSC_VER
+# include <cstddef>
+#endif
+
// uintptr_t and ptrdiff_t
#if defined(__SUNPRO_CC)
# if (__SUNPRO_CC >= 0x5100)
|