//===----------------------------------------------------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
// <functional>
// mem_fun1_t
#include<functional>#include<type_traits>#include<cassert>structA{chara1(){return5;}shorta2(inti){returnshort(i+1);}inta3()const{return1;}doublea4(unsignedi)const{returni-1;}};intmain(){typedefstd::mem_fun1_t<short,A,int>F;static_assert((std::is_base_of<std::binary_function<A*,int,short>,F>::value),"");constFf(&A::a2);Aa;assert(f(&a,5)==6);}