//===----------------------------------------------------------------------===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// // // result_of #include #include typedef bool (&PF1)(); typedef short (*PF2)(long); struct S { operator PF2() const; double operator()(char, int&); void calc(long) const; char data_; }; typedef void (S::*PMS)(long) const; typedef char S::*PMD; int main() { static_assert((std::is_same::type, short>::value), "Error!"); static_assert((std::is_same::type, double>::value), "Error!"); static_assert((std::is_same::type, bool>::value), "Error!"); // static_assert(std::is_same, int)>::type, void>::value, "Error!"); // static_assert(std::is_same::type, char&&>::value, "Error!"); // static_assert(std::is_same::type, const char&>::value, "Error!"); }