summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* mem_fun(): Remove the T_obj* overloads.Murray Cumming2016-03-109-24/+24
| | | | | | | So you would, for instance, always call sigc::mem_fun(*this, ...) instead of sigc::mem_fun(this, ...). Bug #763215
* tuple_transform_each(): Allow this to be a constexpr.Murray Cumming2016-03-081-0/+51
|
* tuple_for_each(): Use of constexpr.Murray Cumming2016-03-081-0/+19
|
* tuple_cdr(), tuple_start(), tuple_end(): Use of constexpr.Murray Cumming2016-03-083-0/+53
|
* Put member_method*<> in sigc::internal namespace.Murray Cumming2016-03-081-11/+11
|
* Rename mem_functor_base to mem_functor.Murray Cumming2016-03-071-1/+1
| | | | And rename bound_mem_functor_base to bound_mem_functor.
* mem_fun.h.m4: Remove mem_functor and const_mem_functor.Murray Cumming2016-03-071-2/+2
| | | | They were only used in one place, internally, and did not add much clarity.
* Added member_method_result<>::type type trait.Murray Cumming2016-03-071-0/+16
| | | | | This seems to be easier than std::result_of<>, which seems to need us to explicitly specify the arguments too.
* Add member_method_class<>::type type trait.Murray Cumming2016-03-071-2/+23
|
* Remove some now-unused tuple_type*<> type traits.Murray Cumming2016-03-074-139/+0
| | | | | | Because we now motly only need the tuple*() utilities to manipulate the actual instances. Some are still need for those tuple*() implementations.
* Add member_method_is_const<> and member_method_is_volatile.Murray Cumming2016-03-072-0/+51
| | | | And some tests for them.
* C++11: Change all typedefs to using.Murray Cumming2016-03-079-18/+18
|
* Update tuple-utils from murrayc-tuple-utils.Murray Cumming2016-03-071-0/+31
| | | | | 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++.
* Remove use of removed SIGC_HAVE_SUN_REVERSE_ITERATORMurray Cumming2016-03-071-4/+0
|
* Put tuple-utils into sigc::internal namespace.Murray Cumming2016-03-076-36/+36
| | | | To discourage people from using libsigc++ just for the tuple utils.
* Move all tuple_*.h files into sigc++/tuple-utils/Murray Cumming2016-03-076-6/+6
|
* track_obj.h: Use this as a normal .h file.Murray Cumming2016-03-071-1/+1
| | | | Instead of genrating it from a .h.m4 file.
* track_obj.h.m4: Make this variadic.Murray Cumming2016-03-071-0/+2
| | | | | | 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.
* Add tuple utils from murrayc-tuple-utils.Murray Cumming2016-03-078-0/+913
|
* exception_catch_functor::operator():Murray Cumming2016-03-071-1/+18
| | | | | | | 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.
* test_acum_iter: Replace signal_accumulated with signal<>::accumulated.Murray Cumming2016-03-071-1/+1
| | | | | I've never noticed this sub-template before, but this syntax is arguably nicer.
* signal.h.m4: Rename signal1/2/3/etc to signal_with_accumulator.Murray Cumming2016-03-071-1/+1
| | | | And make it fully variadic.
* test_disconnect: Use slot<> instead of slot1<>.Murray Cumming2016-03-071-1/+1
| | | | Because we are trying to remove slot1,2,3, etc.
* test_ptr_fun: Comment out what doesn't work with g++.Murray Cumming2016-03-071-4/+16
| | | | | | | 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 .
* C++14: compose: Remove use of deduce_result_type.Murray Cumming2016-03-073-83/+2
| | | | | By removing use of SIGC_WORKAROUND_OPERATOR_PARENTHESES, which hopefully isn't necessary any more.
* C++11: Replace sigc::ref() with std::ref().Murray Cumming2016-03-078-32/+37
| | | | It seems to be remarkably similar.
* *mem_functor(): Remove the numbered versions, leaving just variadic ones.Murray Cumming2016-03-077-16/+16
| | | | | | | 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.
* test_ptr_fun: Fix the build, at least temporarily.Murray Cumming2016-03-071-4/+7
| | | | See https://bugzilla.gnome.org/show_bug.cgi?id=753612#c11
* C++11: ptr_fun.h: Replace generated ptr_fun1/2/3/etc with ptr_fun<>.Murray Cumming2016-03-075-18/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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<type_arg1>(&somefunc) now becomes ptr_fun<void, type_arg2>(&somefunc) and ptr_fun<type_arg1, type_return>(&somefunc) now becomes ptr_fun<type_return, type_arg1>(&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() ^
* C++11: ptr_fun.h: Replace generated pointer_functor1/2/3/etc with ↵Murray Cumming2016-03-071-1/+1
| | | | | | | | 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.
* Fix tiny typo in a comment.Murray Cumming2016-03-071-1/+1
|
* C++11: Make all operator bool() explicit.Murray Cumming2016-03-031-5/+1
|
* Add test_bind_as_slot.Murray Cumming2016-03-012-0/+73
| | | | | This tests sigc::bind()'s indirect use of adaptor_functor<>. I added this because this doesn't work yet in the variadic_bind branch.
* tests: Use = delete instead of private constructors.Murray Cumming2016-01-143-12/+28
| | | | To make classes non-copyable.
* Don't use SIGC_USING_STD()Kjell Ahlstedt2015-12-173-4/+0
| | | | | | The SIGC_USING_STD() macro is defined as an empty string, if some standard C++ symbols are defined in namespace std. They always are. Since many years, SIGC_USING_STD() is an unnecessary macro.
* slot and signal: Add missing move constructors and move assignmentsKjell Ahlstedt2015-11-082-4/+4
| | | | | | | | * sigc++/functors/macros/slot.h.m4: Add move operators for slot<>. * sigc++/macros/signal.h.m4: Add move operators for signal#<> and signal<>. * tests/test_signal_move.cc: * tests/test_slot_move.cc: Test that the source objects are empty. Bug #756484.
* slot: Handle auto-disconnection when a slot contains a slotKjell Ahlstedt2015-11-061-2/+37
| | | | | | | * sigc++/functors/macros/slot.h.m4: Add sigc::visitor<> specializations for slot# and slot. * tests/test_disconnect.cc: Test auto-disconnection of a slot that contains a slot. Bug #755003.
* slot and signal: Fix move constructors and move assignmentsKjell Ahlstedt2015-10-212-4/+8
| | | | | | | | | * sigc++/functors/macros/slot.h.m4: Add documentation. * sigc++/functors/slot_base.[h|cc]: Fix the move operators of slot_base. Don't move a connected slot. * sigc++/signal_base.cc: Fix the move assignment of signal_base. * tests/test_signal_move.cc: * tests/test_slot_move.cc: Really test move assignment. Bug #756484.
* slot_rep::disconnect(): Remove a comment, add a testKjell Ahlstedt2015-10-111-1/+4
| | | | | * sigc++/functors/slot_base.cc: Remove a TODO comment at slot_rep::disconnect(). * tests/test_slot_disconnect.cc: Add a test that assigns an empty slot.
* sigc::trackable: Don't move the callback list2.6.1Kjell Ahlstedt2015-09-261-1/+0
| | | | | * sigc++/trackable.[h|cc]: Don't move the callback list. * tests/test_trackable_move.cc: Remove a comment. Bug #755393.
* Update tests/.gitignoreMurray Cumming2015-09-031-0/+3
|
* Added test_signal_move.Murray Cumming2015-09-012-0/+52
| | | | This seems to work.
* Added test_slot_moveMurray Cumming2015-09-012-0/+68
| | | | This seems to do what it should, acting much like regular slot copying.
* Add test_trackable_move.Murray Cumming2015-09-012-10/+27
| | | | | It doesn't segfault, but I'm not sure it's doing what it should. See the TODO.
* trackable: move assignment operator: null the src.Murray Cumming2015-09-011-0/+66
|
* tests: Use sigc::deduce_result_t<> instead of deduce_result_type<>::type.Murray Cumming2015-08-142-5/+5
| | | | | This removes the last use of sigc::deduce_result_type<>, allowing us to change the implementation of sigc::deduce_result_t more easily.
* C++11: Use std::is_base_of<> instead of our sigc::is_base_and_derived<>.Murray Cumming2015-07-251-1/+1
| | | | | | | | | As suggested by Kjell's comment here: https://git.gnome.org/browse/libsigc++2/commit/sigc++/type_traits.h?id=1e9f65c978be67da71f15231643d504e06a6af3f This also removes sigc::is_base_and_derived<> which should cause only a slight API change but no ABI change. Bug #752560
* C++11: Use of range-based for loops.Murray Cumming2015-07-181-4/+4
|
* C++11: Use auto.Murray Cumming2015-07-1828-45/+45
| | | | | Trying to avoid using auto where its a specific type that we are trying to test for.
* Use -Wshadow with --enable-warnings=fatal.Murray Cumming2015-07-181-20/+20
|