//===----------------------------------------------------------------------===//
//
// 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>typedefbool(&PF1)();typedefshort(*PF2)(long);structS{operatorPF2()const;doubleoperator()(char,int&);};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!");}