summaryrefslogtreecommitdiff
path: root/config.h
diff options
context:
space:
mode:
authorJeffrey Walton <noloader@gmail.com>2017-07-20 09:55:29 -0400
committerJeffrey Walton <noloader@gmail.com>2017-07-20 09:55:29 -0400
commit00f9818b5d8e5aeb6c1057aa395317635bae07a3 (patch)
tree11e1974eeeefdaf319ee7f7ebaca72b06232402a /config.h
parent3485d2180d9bdf2edadbfbb3deee2263083461b5 (diff)
downloadcryptopp-git-00f9818b5d8e5aeb6c1057aa395317635bae07a3.tar.gz
Move byte to Crypto++ namespace (Issue 442)
Also see http://www.cryptopp.com/wiki/std::byte and http://github.com/weidai11/cryptopp/issues/442
Diffstat (limited to 'config.h')
-rw-r--r--config.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/config.h b/config.h
index 291b1488..6a9c8711 100644
--- a/config.h
+++ b/config.h
@@ -194,10 +194,15 @@ namespace CryptoPP { }
# define __USE_W32_SOCKETS
#endif
-typedef unsigned char byte; // put in global namespace to avoid ambiguity with other byte typedefs
+// Originally in global namespace to avoid ambiguity with other byte typedefs.
+// Moved to Crypto++ namespace due to C++17, std::byte and potential compile problems. Also see
+// http://www.cryptopp.com/wiki/std::byte and http://github.com/weidai11/cryptopp/issues/442
+// typedef unsigned char byte;
+#define CRYPTOPP_NO_GLOBAL_BYTE 1
NAMESPACE_BEGIN(CryptoPP)
+typedef unsigned char byte;
typedef unsigned short word16;
typedef unsigned int word32;