1 //===----------------------------------------------------------------------===//
3 // The LLVM Compiler Infrastructure
5 // This file is dual licensed under the MIT and the University of Illinois Open
6 // Source Licenses. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
11 // REQUIRES: c++98 || c++03 || c++11 || c++14
16 #include <type_traits>
22 short a2(int i) {return short(i+1);}
23 int a3() const {return 1;}
24 double a4(unsigned i) const {return i-1;}
29 typedef std::const_mem_fun1_t<double, A, unsigned> F;
30 static_assert((std::is_base_of<std::binary_function<const A*, unsigned, double>, F>::value), "");
33 assert(f(&a, 6) == 5);