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 //===----------------------------------------------------------------------===//
12 // template<Returnable S, ClassType T>
14 // mem_fun(S (T::*f)());
16 // UNSUPPORTED: c++98, c++03, c++11, c++14
21 #include "test_macros.h"
26 short a2(int i) {return short(i+1);}
27 int a3() const {return 1;}
28 double a4(unsigned i) const {return i-1;}
34 assert(std::mem_fun(&A::a1)(&a) == 5);