2016-03-07 Murray Cumming Update NEWS 2016-03-07 Murray Cumming Use mem_fun.h as a regular .h file. Instead of generating it from an .m4 file. This still has some repetition, but it is not nearly as much as before, and it is the last m4 file. Having all the code in normal C++ source files makes it far easier for people to contribute, to actually reduce this repetition. 2016-03-07 Murray Cumming .doap: Correct the web site URL. Though we really must stop using sourceforge even for the web site. 2016-03-07 Murray Cumming Rename our .doap file. 2016-03-07 Murray Cumming Use 2.99.1 instead of 2.9.1 This gives us more room for 2.x releases of the libsigc++-2.0 API in future. 2016-03-07 Murray Cumming Rename mem_functor_base to mem_functor. And rename bound_mem_functor_base to bound_mem_functor. 2016-03-07 Murray Cumming mem_fun.h.m4: Remove mem_functor and const_mem_functor. They were only used in one place, internally, and did not add much clarity. 2016-03-07 Murray Cumming mem_fun.h.m4: Remove bound_const_mem_functor alias. It was only used in one place in the code and didn't add much clarity. 2016-03-07 Murray Cumming bound_mem_functor: Remove constructor that takes pointer. Leaving just the constructor that takes the object by reference. This is not a class that application code would use directly, so there seems no need for the convenience. 2016-03-07 Murray Cumming mem_functor_base: Use member_method_result<>::type. To avoid the (apparent) need to use T_args... with std::result_of_t<>. 2016-03-07 Murray Cumming Added member_method_result<>::type type trait. This seems to be easier than std::result_of<>, which seems to need us to explicitly specify the arguments too. 2016-03-07 Murray Cumming bound_mem_functor_base: Remove now-unnecessary T_obj template parameter. 2016-03-07 Murray Cumming mem_functor_base: Remove T_obj template parameter. Instead using member_method_class<>::type. 2016-03-07 Murray Cumming Add member_method_class<>::type type trait. 2016-03-07 Murray Cumming Remove some now-unused tuple_type*<> type traits. Because we now motly only need the tuple*() utilities to manipulate the actual instances. Some are still need for those tuple*() implementations. 2016-03-07 Murray Cumming hide_functor: Don't specify a specific specialization for operator(). It doesn't seem to be necessary now. 2016-03-07 Murray Cumming Remove unnecessary TODO comment. 2016-03-07 Murray Cumming bound_mem_functor_base: Remove now-unused T_return template parameter. 2016-03-07 Murray Cumming mem_functor_base: Remove T_return template parameter. Instead using std::result_of<> to discover it from the T_func. 2016-03-07 Murray Cumming bound_mem_functor_base: Remove T_limit_reference template parameter. Instead discover it via std::conditional_t and our ember_method_is_const<>::value type traits. 2016-03-07 Murray Cumming use limit_reference.h as a regular .h file. Instead of generating it. 2016-03-07 Murray Cumming Rename limit_reference_base to limit_reference. 2016-03-07 Murray Cumming Remove limit_reference_base<> aliases, such as const_limit_reference. Because limit_reference_base is now simple enough to just use directly. 2016-03-07 Murray Cumming limit_reference.h.m4: Remove unused 2nd LIMIT_REFERENCE() parameter. 2016-03-07 Murray Cumming limit_reference_base: Rename template parameter back to T_type. Because I think that is what this really is. Now this limit_reference_base<> is again as simple as *_limit_reference in libsigc++-2.0 but without the code generation and multiple classes. 2016-03-07 Murray Cumming limit_reference_base: Take just one template parameter. And use std::remove_volatile_t<> to get the other. 2016-03-07 Murray Cumming mem_fun: Use limit_reference_base instead of aliases. Because it is now simple enough. 2016-03-07 Murray Cumming bound_*_mem_functor: Use limit_reference_base instead of aliases. Because it is now simple enough. 2016-03-07 Murray Cumming limit_reference_base<>: Avoid the need for the T_trackable template parameter. By using std::conditional_t and std::is_const<>::value. 2016-03-07 Murray Cumming (bound_)mem_functor_base: Remove T_obj_with_modifier template parameter. Remove the need for this by using std::conditional_t<> and our member_method_is_const<>::value instead. 2016-03-07 Murray Cumming Add member_method_is_const<> and member_method_is_volatile. And some tests for them. 2016-03-07 Murray Cumming mem_fun(): Use base bound_mem_functor_base instead of the aliases. Thus making the bound_mem_functor, bound_const_mem_functor, bound_const_volatile_mem_functor, etc, aliases unused. 2016-03-07 Murray Cumming mem_fun(): Use base mem_functor_base instead of the aliases. Thus making the mem_functor, const_mem_functor, const_volatile_mem_functor, etc, aliases unused. 2016-03-07 Murray Cumming limit_reference.h.m4: Make *_limit_reference template aliases of a limit_reference_base. And have just one visitor specialization, using the base class. As for *_mem_functor. This avoids the repetition. 2016-03-07 Murray Cumming A small const improvement. 2016-03-07 Murray Cumming Use retype.h as a normal .h file. Instead of generating it. 2016-03-07 Murray Cumming retype.h.m4: Have retype() for just the 2 base *_mem_functor_base classes. Then we don't need to generate code for this at all. 2016-03-07 Murray Cumming mem_func.h.m4: Have just one visitor specialization for bound_mem_functor_base. 2016-03-07 Murray Cumming mem_fun.h.m4: Make bound_*_mem_functor template aliases of a bound_mem_functor_base. As for *_mem_functor. This avoids the repetition 2016-03-07 Murray Cumming mem_fun.h.m4: Make *_mem_functor template aliases of a mem_functor_base. This avoids the repetition. 2016-03-07 Murray Cumming functor_trait.h: Do not repeat mem_functor and pointer_function declarations. Instead just include the headers. Then we can change their declarations without having to do it in two places. 2016-03-07 Murray Cumming Split functor_trait.h into functor_base.h and functor_trait.h. So that slot_base doesn't need to include so much. 2016-03-07 Murray Cumming Don't include functor_trait.h where it is not used. 2016-03-07 Murray Cumming C++11: Change all typedefs to using. 2016-03-07 Murray Cumming bind.h.m4: Remove now-unnecessary dnls. 2016-03-07 Murray Cumming Fix a typo in a static_asser() error message. 2016-03-07 Murray Cumming bind_functor: Don't specify the operator() template specialization. This doesn't seem to be necessary now. 2016-03-07 Murray Cumming bind_functor: Make bound_ private. 2016-03-07 Murray Cumming signal_base: clear signal_impl in its own destructor. This deals with some TODO comments. This patch is based on a suggestion from Kjell Ahlstedt: See https://bugzilla.gnome.org/show_bug.cgi?id=167714#c14 2016-03-07 Murray Cumming hide_functor::operator(): Do some perfect forwarding. 2016-03-07 Murray Cumming hide_functor: Avoid using std::make_tuple(). Because it can change types, such as changing std::ref()ed T to T. 2016-03-07 Murray Cumming Update tuple-utils from murrayc-tuple-utils. tuple_transform_each() now iterates in order, instead of in reverse, though that didn't seem to matter to how we used it in libsigc++. 2016-03-07 Murray Cumming Connection::operator bool(): Make this const. 2016-03-07 Murray Cumming Remove use of removed SIGC_HAVE_SUN_REVERSE_ITERATOR 2016-03-07 Murray Cumming sigc++config.h.in: Remove unused macros. 2016-03-07 Murray Cumming slot/slot_base: Make some API private. 2016-03-07 Murray Cumming slot_rep::dup(): Take a slot_rep* instead of void*. 2016-03-07 Murray Cumming Add and use notifiable base class instead of void*. Use notifiable as the base class for trackable, connection, signal_impl, self_and_iter and destroy_notify_struct. Use this notifiable* instead of void* for the destroy/notify callback data. This is a little more type-safe and self-documenting. Bug #302152 2016-03-07 Murray Cumming Remove C++ standard library checks. We do not actually use these, and it must have been years since any compiler didn't, for instance, have the std namespace. 2016-03-07 Murray Cumming Remove nil and the associated pragma push/pop fixes for Objective C++. 2016-03-07 Murray Cumming signal: Use void instead of nil to mean no accumulator. 2016-03-07 Murray Cumming Remove unused SIGC_CXX_SELF_REFERENCE_IN_MEMBER_INITIALIZATION() configure check. 2016-03-07 Murray Cumming Remove SIGC_WORKAROUND_OPERATOR_PARENTHESES, using just .template operator()<>. We can add it back if we find that the Sun or Microsoft compilers still need it, when/if they support enough C++14 anyway. We can always use libsigc++-2.0 to easily discover what its configure checks say about the compiler behaviour. 2016-03-07 Murray Cumming adaptor_functor: Do some perfect forwarding. 2016-03-07 Murray Cumming retype_return_functor: Do some perfect forwarding. 2016-03-07 Murray Cumming compose: Do some perfect forwarding. 2016-03-07 Murray Cumming track_obj_functor: Do some perfect forwarding. 2016-03-07 Murray Cumming bind(): Correct the static_assert(). 2016-03-07 Murray Cumming bind(): Add a static_assert() for when bind is passed a too-high index. 2016-03-07 Murray Cumming template.macros.m4: Remove unused m4 macros. 2016-03-07 Murray Cumming Put tuple-utils into sigc::internal namespace. To discourage people from using libsigc++ just for the tuple utils. 2016-03-07 Murray Cumming Move all tuple_*.h files into sigc++/tuple-utils/ 2016-03-07 Murray Cumming bind_functor::operator(): Do perfect forwarding. To be consistent with the other operator(). 2016-03-07 Murray Cumming Create a parallel-installable sigc++-3.0 API/ABI. 2016-03-07 Murray Cumming Add a TODO comment. 2016-03-07 Murray Cumming bind: Some perfect forwarding. 2016-03-07 Murray Cumming Avoid std::make_tuple(). To preserve std::ref()ed elements. 2016-03-07 Murray Cumming Put bind() in its own bind.h file instead of generating it. 2016-03-07 Murray Cumming bind.h.m4: Make variadic. With a partial build fix from Marcin Kolny. 2016-03-07 Murray Cumming bind: Make the visitor<> specialization variadic. 2016-03-07 Murray Cumming bind<-1>: Store the bound args in a tuple. 2016-03-07 Murray Cumming bind(): Store the single bound arg in a tuple. 2016-03-07 Murray Cumming track_obj.h: Use this as a normal .h file. Instead of genrating it from a .h.m4 file. 2016-03-07 Murray Cumming track_obj.h.m4: Make this variadic. This uses a tuple_for_each<>() utility taken from here: https://github.com/murraycu/murrayc-tuple-utils/tree/master/tuple-utils for the visit_each() specialization. 2016-03-07 Murray Cumming hide.h: Use this as a normal .h file. Instead of generating it from an .h.m4 file. 2016-03-07 Murray Cumming hide_functor: Make this fully variadic. 2016-03-07 Murray Cumming hide.h.m4: hide_functor::operator(): Make this variadic. This uses some tuple manipulation utilities so that the variadic parameters with which we call a method can be based on the variadic parameters that the caller received, but not exactly. In this case, we need to replace an element in the middle of a tuple. There is probably a more efficient way to do this. For now, this is using copies of the tuple utilities from here: https://github.com/murraycu/murrayc-tuple-utils/tree/master/tuple-utils 2016-03-07 Murray Cumming Add tuple utils from murrayc-tuple-utils. 2016-03-07 Murray Cumming exception_catch_functor::operator(): Remove the unnecessary operator()() overload. This did need me to change the test code so that it doesn't try to provide a catch function that returns something, but that seems more correct anyway. 2016-03-07 Murray Cumming Another use of decltype(auto) for a return type 2016-03-07 Murray Cumming Correct some documentation. 2016-03-07 Murray Cumming More use of decltype(auto) for return types. 2016-03-07 Murray Cumming retype: Make this variadic. However, we still need to generate const/volatile/const_volatile/ bound_const/bound_volatile/bound_const_volatile versions. 2016-03-07 Murray Cumming slot.h: Remove comment about this being generated. 2016-03-07 Murray Cumming slot.h: Use this as a normal .h file. Instead of generating it from a .h.m4 file. 2016-03-07 Murray Cumming slot: Make this fully variadic. 2016-03-07 Murray Cumming slot.h.m4: make slot_call fully variadic. 2016-03-07 Murray Cumming bind_functor::operator()(): Give this a dummy template parameter. And remove the m4 ifelse from slot.h.m4 because we can now resolve that operator() when calling it with an empty variadic parameter pack. 2016-03-07 Murray Cumming slot.h.m4: visit_each specialization: Make this variadic. 2016-03-07 Murray Cumming make_slot: Use decltype(auto) for return type. 2016-03-07 Murray Cumming Replace some uses of result_type with decltype(auto). 2016-03-07 Murray Cumming Remove code that used the SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD ifndefs. See the previous commit. 2016-03-07 Murray Cumming test_acum_iter: Replace signal_accumulated with signal<>::accumulated. I've never noticed this sub-template before, but this syntax is arguably nicer. 2016-03-07 Murray Cumming signal.h: Use this as a normal header file. Instead of generating it from a .h.m4 file. 2016-03-07 Murray Cumming signal: Make this fully variadic. 2016-03-07 Murray Cumming signal.h.m4: Rename signal1/2/3/etc to signal_with_accumulator. And make it fully variadic. 2016-03-07 Murray Cumming signal1/2/3/etc: Make this variadic. Though the separate generated signal1/2/3/etc still exist. 2016-03-07 Murray Cumming signal1/2/3: Move T_accumulator to second position. Because it can't go at the end if we want to change the args to a variadic template pack. 2016-03-07 Murray Cumming Remove useless SIGC_TYPEDEF_REDEFINE_ALLOWED 2016-03-07 Murray Cumming signal.h.m4: Make signal_emit fully variadic. 2016-03-07 Murray Cumming signal_emit1/2/3/etc: Simplify call_type typedef. 2016-03-07 Murray Cumming signal.h.m4: signal_emit1/2/3/etc: Make this variadic. Though we still have the separate generated signal_emit1/2/3, etc. This is the first time that we need to use a tuple, and then std::index_sequence(), to call another method with the stored (in a tuple) parameter pack. 2016-03-07 Murray Cumming signal.h.m4: signal_emit: Put the T_Accumulator before the args. So the args can be variadic eventually. 2016-03-07 Murray Cumming test_disconnect: Use slot<> instead of slot1<>. Because we are trying to remove slot1,2,3, etc. 2016-03-07 Murray Cumming slot.h.m4: Make slot1/2/3/etc variadic. While still having slot1/2/3/ themselves. This is lets us take another small step in the conversion to variadic templates. 2016-03-07 Murray Cumming test_ptr_fun: Comment out what doesn't work with g++. We probably need to get this working, but it already works with clang++ (I'm using clang++ 3.7), so I'm just doing this for now, with TODO comments, so I can move forwards. I'm using g++ 5.2.1 . 2016-03-07 Murray Cumming bind(): Make this variadic. Instead of generating many versions. bind_functor<> is not at all variadic yet. 2016-03-07 Murray Cumming bind(): Move T_functor the start. This is different to the bind version but it's the only way to have a parameter pack at the end. Hopefully this version of bind() never needs to be called for specific template types. 2016-03-07 Murray Cumming C++14: bind(): Use decltype(auto) for the return type. This simplifies the code a bit. 2016-03-07 Murray Cumming Rename deduce_result_type.h to adaptor_base.h Because that is all this file now contains. However, I suspect that we don't need adaptor_base at all now. 2016-03-07 Murray Cumming C++14 Remove now-unused deduce_result_t. 2016-03-07 Murray Cumming C++14: compose: Remove use of deduce_result_type. By removing use of SIGC_WORKAROUND_OPERATOR_PARENTHESES, which hopefully isn't necessary any more. 2016-03-07 Murray Cumming C++14: operator(): Use decltype(auto) instead of deduce_result_type. So we can remove all the nasty deduce_result_type code, which is hard to make fully variadic in bind(). 2016-03-07 Murray Cumming Use C++14. By using the MM_AX_CXX_COMPILE_STDCXX() m4 macro that I just added to mm-common. This lets us use std::integer_sequence (and std::index_sequence) with std::tuple. We probably also want to use decltype(auto) return types for template methods, as long as that doesn't slow down compile times. 2016-03-07 Murray Cumming deduce_result_type.h: Remove comment about it being generated. 2016-03-07 Murray Cumming adaptor_trait.h: Remove comment about it being generated. 2016-03-07 Murray Cumming C++11: Replace sigc::ref() with std::ref(). It seems to be remarkably similar. 2016-03-07 Murray Cumming Remove (and replace) the _R_ and _P_ m4 macros. They just make it that little bit harder to convert the code to non-generated C++. 2016-03-07 Murray Cumming Remove (previously deprecated) lambda API. 2016-03-07 Murray Cumming retype_functor: Make the slot version variadic. 2016-03-07 Murray Cumming retype_functor: Make the pointer_functor version variadic. 2016-03-07 Murray Cumming exception_catch.h: Use this as a normal .h file. Instead of generating it from a .h.m4 file. 2016-03-07 Murray Cumming exception_catch_functor: Make this variadic. Instead of generating multiple overloads of operator(). 2016-03-07 Murray Cumming track_obj_functor1*(): Make operator() variadic. Instead of generating multiple overloads. 2016-03-07 Murray Cumming retype_return.h: Use this as a normal .h file. Instead of generating it from a .h.m4 file. 2016-03-07 Murray Cumming retype_return_functor: Make this variadic. Instead of generating 7 overloads of operator(). 2016-03-07 Murray Cumming compose.h: Use this as a normal .h file. Instead of generating it from a .h.m4 file. 2016-03-07 Murray Cumming compose1_functor, compose2_functor: Make these variadic. Instead of using 7 arguments with void defaults, and instead of generating 7 overloads of operator(). 2016-03-07 Murray Cumming deduce_result_type.h: Use this as a regular .h file. Instead of generating it from a .h.m4 file. 2016-03-07 Murray Cumming bind_return.h: Use this as a normal .h file. Instead of generating it from a .h.m4 file. 2016-03-07 Murray Cumming bind_return_functor: operator(): Make this variadic. Instead of generating multiple overloads. 2016-03-07 Murray Cumming adaptor_trait.h: Use this as a regular .h file. Instead of generating it from a .h.m4 file. 2016-03-07 Murray Cumming adaptor_function: Make the operator() variadic. Instead of generating many overloads. 2016-03-07 Murray Cumming adaptor_functor: Make deduce_result_type variadic. Instead of having all 7 arguments, defaulting to void. 2016-03-07 Murray Cumming mem_fun.h.m4: Remove now-unnecessary LIST() calls. 2016-03-07 Murray Cumming filelist.am: Mention ptr_fun.h. I forgot to do this when I changed this from a a .h.m4 file to a .h file. 2016-03-07 Murray Cumming functor_trait.h: Use this as a normal header, not generated. 2016-03-07 Murray Cumming functor_trait.h.m4: Use a variadic template instead of generating many. 2016-03-07 Murray Cumming *mem_functor(): Remove the numbered versions, leaving just variadic ones. Do not generate *mem_functor0 through *mem_functor7. Instead just generate variadic *mem_functor<>. We do still generate mem_functor, const_mem_functor and const_volatile_mem_functor, which seems messy. 2016-03-07 Murray Cumming ptr_fun.h: Use this as a normal header instead of generating it. 2016-03-07 Murray Cumming test_ptr_fun: Fix the build, at least temporarily. See https://bugzilla.gnome.org/show_bug.cgi?id=753612#c11 2016-03-07 Murray Cumming C++11: ptr_fun.h: Replace generated ptr_fun1/2/3/etc with ptr_fun<>. Note that T_Return must now be the first parameter, so that the variadic template parameters may be trailing, and this means that the return type must now be specified if you specify any argument types. For instance: ptr_fun(&somefunc) now becomes ptr_fun(&somefunc) and ptr_fun(&somefunc) now becomes ptr_fun(&somefunc) which might be an annoying API change, even though most people just use ptr_fun(). However, this breaks the tests: test_ptr_fun.cc: In function ‘int main(int, char**)’: test_ptr_fun.cc:64:21: error: no matches converting function ‘foo’ to type ‘void (*)()’ sigc::ptr_fun(&foo)(); ^ test_ptr_fun.cc:24:6: note: candidates are: void {anonymous}::foo(int) void foo(int i1) ^ test_ptr_fun.cc:18:5: note: int {anonymous}::foo() int foo() ^ 2016-03-07 Murray Cumming C++11: ptr_fun.h: Replace generated pointer_functor1/2/3/etc with pointer_functor. Using C++11 variadic templates arguments. Note that T_Return is now the first template parameter, so that the variadic parameters can be the trailing parameters, as in std::function. 2016-03-07 Murray Cumming Fix tiny typo in a comment. 2016-03-06 Murray Cumming docs: Refer to it as libsigc++, not libsigc++2. 2016-03-06 Murray Cumming website/README: Mention the new git repository. 2016-03-03 Murray Cumming SIGC_CXX_HAS_SUN_REVERSE_ITERATOR: Add std:: now that I removed the using std. See https://bugzilla.gnome.org/show_bug.cgi?id=762065#c2 2016-03-03 Murray Cumming C++11: Make all operator bool() explicit. 2016-03-03 Murray Cumming Remove now-unnecessary SIGC_CXX_HAS_NAMESPACE_STD() configure check. Bug #762065 (Kjell Ahlstedt) 2016-03-03 Murray Cumming Remove unused SIGC_CXX_SELF_REFERENCE_IN_MEMBER_INITIALIZATION() configure check. Bug #762065 (Kjell Ahlstedt) 2016-03-02 Kjell Ahlstedt Improve the documentation of mem_fun() * sigc++/functors/macros/mem_fun.h.m4: * sigc++/functors/slot_base.h: Make it clear that mem_fun() does not return a slot, and 'auto s = sigc::mem_fun(....)' is not equivalent to 'sigc::slot<....> s = sigc::mem_fun(....)'. The confusing documentation was noted by Andrejs Hanins on libsigc-list. 2016-03-01 Murray Cumming Add test_bind_as_slot. This tests sigc::bind()'s indirect use of adaptor_functor<>. I added this because this doesn't work yet in the variadic_bind branch.