//===----------------------------------------------------------------------===// // // The LLVM Compiler Infrastructure // // This file is dual licensed under the MIT and the University of Illinois Open // Source Licenses. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// // // template // struct hash // : public unary_function // { // size_t operator()(T val) const; // }; // Not very portable #include #include #include #include "../../min_allocator.h" int main() { { typedef std::vector T; typedef std::hash H; static_assert((std::is_base_of, H>::value), ""); bool ba[] = {true, false, true, true, false}; T vb(std::begin(ba), std::end(ba)); H h; assert(h(vb) != 0); } #if __cplusplus >= 201103L { typedef std::vector> T; typedef std::hash H; static_assert((std::is_base_of, H>::value), ""); bool ba[] = {true, false, true, true, false}; T vb(std::begin(ba), std::end(ba)); H h; assert(h(vb) != 0); } #endif }