From 30b5aedae8c32a86f021a679cf3924a48b8b4e1f Mon Sep 17 00:00:00 2001 From: terik23 Date: Sun, 18 Mar 2018 20:32:55 +0500 Subject: [PATCH] Fix sample error: ISO C++ forbids taking the address of a bound member function to form a pointer to member function. --- example/example.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/example/example.cpp b/example/example.cpp index fc23f72..8e1e4d4 100644 --- a/example/example.cpp +++ b/example/example.cpp @@ -76,7 +76,7 @@ int main() { std::cout << NAMEOF(~intValue) << std::endl; // intValue std::cout << NAMEOF(!intValue) << std::endl; // intValue std::cout << NAMEOF(someVar.SomeMethod1()) << std::endl; // SomeMethod1() - std::cout << NAMEOF(&someVar.SomeMethod2) << std::endl; // SomeMethod2 + std::cout << NAMEOF(&SomeStruct::SomeMethod2) << std::endl; // SomeMethod2 std::cout << NAMEOF(SomeMethod3) << std::endl; // SomeMethod3 std::cout << NAMEOF_TYPE(int[]) << std::endl; // int[] @@ -84,7 +84,7 @@ int main() { std::cout << NAMEOF_TYPE(Long::LL) << std::endl; // LL std::cout << NAMEOF_FUN(someVar.SomeMethod1()) << std::endl; // SomeMethod1() - std::cout << NAMEOF_FUN(&someVar.SomeMethod2) << std::endl; // SomeMethod2 + std::cout << NAMEOF_FUN(&SomeStruct::SomeMethod2) << std::endl; // SomeMethod2 std::cout << NAMEOF_FUN(SomeMethod3) << std::endl; // SomeMethod3 std::cout << NAMEOF_VAR(someVar.SomeField) << std::endl; // SomeField