martinmoene / expected-dark

Expected objects for C++11 and later (and later perhaps C++98 )
MIT License
52 stars 4 forks source link

Missing include for function #12

Closed rnburn closed 7 years ago

rnburn commented 7 years ago

Compiling with clang++

Apple LLVM version 8.1.0 (clang-802.0.42)
Target: x86_64-apple-darwin16.7.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

gives the error

expected-lite/include/nonstd/expected.hpp:1207:8: error: explicit specialization of non-template struct 'hash'
struct hash< nonstd::expected<T,E> >
       ^   ~~~~~~~~~~~~~~~~~~~~~~~~~

looks like expected.hpp is missing a #include <functional> which is where std::hash is defined.