diff options
author | Murray Cumming <murrayc@murrayc.com> | 2016-01-07 11:29:59 +0100 |
---|---|---|
committer | Murray Cumming <murrayc@murrayc.com> | 2016-03-07 10:41:48 +0100 |
commit | e10e8807dec85f40af09318a008fad0b999c1b98 (patch) | |
tree | ace553bc8d1a4668221e83804338b77e7bf63dd1 /tests | |
parent | da723f3e623b318e324f65133370053aeae5fa89 (diff) | |
download | sigc++-e10e8807dec85f40af09318a008fad0b999c1b98.tar.gz |
test_ptr_fun: Fix the build, at least temporarily.
See https://bugzilla.gnome.org/show_bug.cgi?id=753612#c11
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_ptr_fun.cc | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/tests/test_ptr_fun.cc b/tests/test_ptr_fun.cc index 1784aed..fa8e9b6 100644 --- a/tests/test_ptr_fun.cc +++ b/tests/test_ptr_fun.cc @@ -61,12 +61,15 @@ int main(int argc, char* argv[]) if (!util->check_command_args(argc, argv)) return util->get_result_and_delete_instance() ? EXIT_SUCCESS : EXIT_FAILURE; - sigc::ptr_fun(&foo)(); + //Test use of overloaded functions that differ by number of parameters + //and by return type + sigc::ptr_fun<int>(&foo)(); util->check_result(result_stream, "foo()"); - sigc::ptr_fun(&foo)(1); + sigc::ptr_fun<void>(&foo)(1); util->check_result(result_stream, "foo(int 1)"); + //Test use of overloaded functions that differ by parameter type: #if ENABLE_TEST_OF_OVERLOADED_FUNCTIONS sigc::ptr_fun<void, char>(&bar)(2); util->check_result(result_stream, "bar(char 2)"); @@ -74,11 +77,11 @@ int main(int argc, char* argv[]) sigc::ptr_fun<void, float>(&bar)(2.0f); util->check_result(result_stream, "bar(float 2)"); #else - sigc::ptr_fun(&bar)(2.0f); + sigc::ptr_fun<void>(&bar)(2.0f); util->check_result(result_stream, "bar(float 2)"); #endif - sigc::ptr_fun(&bar)(3, 5); + sigc::ptr_fun<double>(&bar)(3, 5); util->check_result(result_stream, "bar(int 3, int 5)"); sigc::ptr_fun(&test::foo)(); |