//===----------------------------------------------------------------------===// // // ΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚ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 template void test() { typedef std::bitset T; typedef std::hash H; static_assert((std::is_base_of, H>::value), ""); H h; T bs(static_cast(N)); assert(h(bs) == N); } int main() { test<0>(); test<10>(); test<100>(); test<1000>(); }