//===----------------------------------------------------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
// <functional>
// result_of<Fn(ArgTypes...)>
#include<type_traits>#include<memory>typedefbool(&PF1)();typedefshort(*PF2)(long);structS{operatorPF2()const;doubleoperator()(char,int&);voidcalc(long)const;chardata_;};typedefvoid(S::*PMS)(long)const;typedefcharS::*PMD;intmain(){static_assert((std::is_same<std::result_of<S(int)>::type,short>::value),"Error!");static_assert((std::is_same<std::result_of<S&(unsignedchar,int&)>::type,double>::value),"Error!");static_assert((std::is_same<std::result_of<PF1()>::type,bool>::value),"Error!");// static_assert(std::is_same<std::result_of<PMS(std::unique_ptr<S>, int)>::type, void>::value, "Error!");
// static_assert(std::is_same<std::result_of<PMD(S)>::type, char&&>::value, "Error!");
// static_assert(std::is_same<std::result_of<PMD(const S*)>::type, const char&>::value, "Error!");
}