//===----------------------------------------------------------------------===// // // The LLVM Compiler Infrastructure // // This file is dual licensed under the MIT and the University of Illinois Open // Source Licenses. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// // // UNSUPPORTED: c++98, c++03 // // // // result_of #include #include #include #include "test_macros.h" struct wat { wat& operator*() { return *this; } void foo(); }; struct F {}; struct FD : public F {}; #if TEST_STD_VER > 14 template struct test_invoke_result; template struct test_invoke_result { static void call() { static_assert(std::is_invocable::value, ""); static_assert(std::is_invocable_r::value, ""); static_assert((std::is_same::type, Ret>::value), ""); static_assert((std::is_same, Ret>::value), ""); } }; #endif template void test_result_of_imp() { static_assert((std::is_same::type, U>::value), ""); #if TEST_STD_VER > 11 static_assert((std::is_same, U>::value), ""); #endif #if TEST_STD_VER > 14 test_invoke_result::call(); #endif } int main() { { typedef char F::*PMD; test_result_of_imp(); test_result_of_imp(); test_result_of_imp(); test_result_of_imp(); test_result_of_imp(); test_result_of_imp(); test_result_of_imp(); test_result_of_imp(); test_result_of_imp(); test_result_of_imp(); test_result_of_imp(); test_result_of_imp(); test_result_of_imp(); test_result_of_imp(); test_result_of_imp(); test_result_of_imp(); test_result_of_imp(); test_result_of_imp(); test_result_of_imp(); test_result_of_imp(); test_result_of_imp(); test_result_of_imp(); test_result_of_imp(); test_result_of_imp(); test_result_of_imp), char &>(); test_result_of_imp), const char &>(); test_result_of_imp), char &>(); test_result_of_imp), const char &>(); test_result_of_imp), char &>(); test_result_of_imp), const char &>(); test_result_of_imp), char &>(); test_result_of_imp), const char &>(); } { test_result_of_imp (); test_result_of_imp (); test_result_of_imp (); test_result_of_imp (); test_result_of_imp (); test_result_of_imp (); test_result_of_imp (); test_result_of_imp (); test_result_of_imp (); test_result_of_imp (); test_result_of_imp (); test_result_of_imp (); test_result_of_imp (); test_result_of_imp (); test_result_of_imp (); test_result_of_imp (); test_result_of_imp (); test_result_of_imp (); test_result_of_imp (); test_result_of_imp (); test_result_of_imp (); test_result_of_imp (); test_result_of_imp (); test_result_of_imp (); test_result_of_imp (); test_result_of_imp (); test_result_of_imp (); } { test_result_of_imp (); test_result_of_imp (); test_result_of_imp (); test_result_of_imp (); test_result_of_imp (); test_result_of_imp (); test_result_of_imp (); test_result_of_imp (); test_result_of_imp (); test_result_of_imp (); test_result_of_imp (); test_result_of_imp (); test_result_of_imp (); test_result_of_imp (); test_result_of_imp (); test_result_of_imp (); test_result_of_imp (); test_result_of_imp (); test_result_of_imp (); test_result_of_imp (); test_result_of_imp (); test_result_of_imp (); test_result_of_imp (); test_result_of_imp (); test_result_of_imp (); test_result_of_imp (); test_result_of_imp (); } { test_result_of_imp)) (), int>(); test_result_of_imp)) () const, int>(); test_result_of_imp )) (), int>(); test_result_of_imp )) () const, int>(); } test_result_of_imp(); }