Skip to content

Commit

Permalink
+ fix for folly compile in linux
Browse files Browse the repository at this point in the history
+ docker fixes
  • Loading branch information
leitchy committed Jul 30, 2019
1 parent 22db564 commit 63139ba
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
1 change: 0 additions & 1 deletion Examples/docker/Dockerfile.base.ubuntu.18.04
Original file line number Diff line number Diff line change
Expand Up @@ -132,4 +132,3 @@ RUN cmake .. \
&& make install \
&& make clean \
&& cd $ROOTDIR

13 changes: 11 additions & 2 deletions Source/moja.core/include/moja/hash.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,19 @@

#include "moja/_core_exports.h"

//#include "moja/types.h"
//#include "moja/applytuple.h"
#include <Poco/Nullable.h>

// clang-format off
#include <functional> // needed by folly
#include <folly/hash/Hash.h>
// clang-format on

namespace folly {
template <typename T>
struct hasher<Poco::Nullable<T>> {
size_t operator()(const Poco::Nullable<T>& key) const { return key.isNull() ? 0 : Hash()(key.value()); }
};
} // namespace folly

namespace moja {
using folly::hasher;
Expand Down

0 comments on commit 63139ba

Please sign in to comment.