diff options
author | Murray Cumming <murrayc@murrayc.com> | 2015-08-14 22:35:55 +0200 |
---|---|---|
committer | Murray Cumming <murrayc@murrayc.com> | 2015-08-14 22:35:55 +0200 |
commit | 0c03f942eb5ad987919303008edbd13c1f7d6941 (patch) | |
tree | b855c45bec0828532fa59e81c43ee805b93c3169 | |
parent | 0590de0f5232ef9b77cb3e1969035430cf608862 (diff) | |
download | sigc++-0c03f942eb5ad987919303008edbd13c1f7d6941.tar.gz |
exception_catch.h: Generate deduce_result_type for the void specializations too.
I guess this is correct and test_exception_catch still passes.
Without this, it's actually using, for instance:
sigc::deduce_result_type<T_arg1, T_Arg2>
even though sigc::deduce_result_type<> should really be called with a result type
first, like so:
sigc::deduce_result_type<T_return, T_arg1, T_Arg2>
Explicitly changing it to use
sigc::deduce_result_type<T_return, T_Arg1, T_Arg2>
or
sigc::deduce_result_type<T_Arg1, T_Arg2>
instead of just
deduce_result_type<T_Arg1, T_Arg2>
doesn't seem to break things either, probably out of luck,
but changing it to define a type that it actually seems to expect seems
cleaner, and makes it easier for us to change sigc::deduce_result_type.
-rw-r--r-- | sigc++/adaptors/macros/exception_catch.h.m4 | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sigc++/adaptors/macros/exception_catch.h.m4 b/sigc++/adaptors/macros/exception_catch.h.m4 index f94581f..5f5cd10 100644 --- a/sigc++/adaptors/macros/exception_catch.h.m4 +++ b/sigc++/adaptors/macros/exception_catch.h.m4 @@ -131,6 +131,12 @@ struct exception_catch_functor<T_functor, T_catcher, void> : public adapts<T_fun typedef void result_type; typedef typename adapts<T_functor>::adaptor_type adaptor_type; +#ifndef DOXYGEN_SHOULD_SKIP_THIS + template <LOOP(class T_arg%1=void, CALL_SIZE)> + struct deduce_result_type + { typedef typename adaptor_type::template deduce_result_type<LOOP(_P_(T_arg%1),CALL_SIZE)>::type type; }; +#endif + void operator()(); |