Fix definition of std::hash<unique_ptr> in C++ models

Summary:stdlibc++ headers didn't like the fact that hash<unique_ptr> didn't have defined operator() directly.
Do that and provide empty body. Keep inheritance in case it helps compilation to succeed.

Reviewed By: dulmarod

Differential Revision: D3207721

fb-gh-sync-id: 8c950da
fbshipit-source-id: 8c950da
master
Andrzej Kotulski 9 years ago committed by Facebook Github Bot 4
parent 05c218d84f
commit 7a91f47131

@ -332,8 +332,10 @@ inline bool operator>=(nullptr_t, const unique_ptr<_T1, _D1>& __x) {
return !(nullptr < __x);
}
template <class T>
struct hash<unique_ptr<T>> : public hash<std__unique_ptr<T>> {};
template <class T, class D>
struct hash<unique_ptr<T, D>> : public hash<std__unique_ptr<T, D>> {
size_t operator()(const unique_ptr<T, D>& __u) const noexcept {}
};
template <typename _Tp>
struct _MakeUniq2 {

Loading…
Cancel
Save