//===----------------------------------------------------------------------===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// // // template // struct hash // : public unary_function // { // size_t operator()(T val) const; // }; // Not very portable #include #include #include #include template void test() { static_assert((std::is_base_of, std::hash >::value), ""); std::hash h; typedef typename std::remove_pointer::type type; type i; type j; assert(h(&i) != h(&j)); } int main() { test(); }