From 63139ba2d2c1a2d9c9aba5bae0b64567fab8f200 Mon Sep 17 00:00:00 2001 From: Jim Date: Tue, 30 Jul 2019 10:07:18 +1000 Subject: [PATCH] + fix for folly compile in linux + docker fixes --- Examples/docker/Dockerfile.base.ubuntu.18.04 | 1 - Source/moja.core/include/moja/hash.h | 13 +++++++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/Examples/docker/Dockerfile.base.ubuntu.18.04 b/Examples/docker/Dockerfile.base.ubuntu.18.04 index af35417..c22d075 100644 --- a/Examples/docker/Dockerfile.base.ubuntu.18.04 +++ b/Examples/docker/Dockerfile.base.ubuntu.18.04 @@ -132,4 +132,3 @@ RUN cmake .. \ && make install \ && make clean \ && cd $ROOTDIR - diff --git a/Source/moja.core/include/moja/hash.h b/Source/moja.core/include/moja/hash.h index 971de97..ff2d03f 100644 --- a/Source/moja.core/include/moja/hash.h +++ b/Source/moja.core/include/moja/hash.h @@ -4,10 +4,19 @@ #include "moja/_core_exports.h" -//#include "moja/types.h" -//#include "moja/applytuple.h" +#include +// clang-format off +#include // needed by folly #include +// clang-format on + +namespace folly { + template + struct hasher> { + size_t operator()(const Poco::Nullable& key) const { return key.isNull() ? 0 : Hash()(key.value()); } + }; +} // namespace folly namespace moja { using folly::hasher;