//===----------------------------------------------------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
// <functional>
// mem_fun_ref_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_fun_ref_t<char,A>F;static_assert((std::is_base_of<std::unary_function<A,char>,F>::value),"");constFf(&A::a1);Aa;assert(f(a)==5);}