| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
trackable_signal_with_accumulator derives from trackable.
A slot made with trackable_signal_with_accumulator::make_slot() is
automatically disconnected when the signal is deleted, as in sigc++2.
Fixes #80
|
|
|
|
|
| |
This reverts commit 8fb78907ccf3c4425d23ba1555f365f22d376685.
It's not safe. See #80
|
|
|
|
|
|
| |
A slot made with signal_with_accumulator::make_slot() is then
automatically disconnected when the signal is deleted, as in sigc++2.
Fixes #80
|
|
|
|
| |
Format sigc++/signal_base.h.
|
|
|
|
|
| |
and therefore the made slot must be manually disconnected if the
signal is deleted. See #80
|
| |
|
|
|
|
| |
Format sigc++/adaptors/track_obj.h.
|
|
|
|
|
| |
track_object() checks that the listed objects derive from sigc::trackable.
Fixes #78
|
|
|
|
|
|
| |
Doxygen creates links to sigc::slot and sigc::signal only if
template parameters are included in the documentation.
sigc::slot<T_return(T_arg...)>, sigc::signal<T_return(T_arg...)>.
|
|
|
|
|
| |
Some documentation of template parameters described sigc++-2.0
rather than sigc++-3.0.
|
|
|
|
|
|
| |
Irritating that different versions of clang-format don't agree on what's
an acceptable format, and that clang-format 10 is not easily installable
on Ubuntu 21.10.
|
|
|
|
|
|
|
|
|
|
| |
* sigc++/functors/mem_fun.h:
* sigc++/functors/ptr_fun.h:
* tests/test_rvalue_ref.cc: Reformated with clang-format 13,
but CI uses clang-format 10.
Also add #include <utility> where std::forward was added. Doesn't seem
to be necessary with g++ or clang++. Mostly a precaution.
|
|
|
|
|
| |
This is a missed addition to the commit that allowed rvalue references
in slot parameters.
|
|
|
|
|
| |
This is a missed addition to the commit that allowed rvalue references
in slot parameters.
|
|
|
|
|
|
|
|
|
|
|
|
| |
* tests/.gitignore:
* tests/CMakeLists.txt:
* tests/Makefile.am: Add test_rvalue_ref.
* tests/test_rvalue_ref.cc: Avoid [-Werror=unused-parameter]
when building with warnings=fatal.
Some files have been reformated with clang-format in order to
make the CI tests happy. Reformated with clang-format 12, but CI
uses clang-format 10.
|
|
|
|
| |
This reverts commit 01652fdbc9f6fc2e72b217c9de8c89c93f95ba7c.
|
|
|
|
|
|
|
|
|
|
|
|
| |
* tests/.gitignore:
* tests/CMakeLists.txt:
* tests/Makefile.am: Add test_rvalue_ref.
* tests/test_rvalue_ref.cc: Avoid [-Werror=unused-parameter]
when building with warnings=fatal.
Some files have also been reformated with clang-format in order to
make the CI tests happy. Reformated with clang-format 12, but CI
uses clang-format 10.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In code based on Glibmm it's quite common to convert a Glib C structure
to a Glib::Object's descendant before passing it as a parameter to a
slot. If the slot is not supposed to modify the object, then everything
is fine, we can declare the parameter as a const reference and the
temporary object will be accurately dealt with by the compiler. However,
if the Glib based object is getting modified, the only way to pass it to
the slot is to declare it a Glib::RefPtr shared pointer. This creates a
lot of unnecessary churn of memory allocations for a simple deal of
calling a signal. However, C++ has a specific mean for this particular
semantic of passing a temporary object: rvalue reference.
For example, somewhere inside Gtkmm might be a declaration:
_WRAP_SIGNAL(void sun_rose(const Glib::RefPtr<Gtk::Sun> &new_sun),
"sun-rose")
Instead its more semantically correct to write:
_WRAP_SIGNAL(void sun_rose(Gtk::Sun &&new_sun), "sun-rose")
And later somewhere in your code:
world->signal_sun_rose().connect([&](auto &&new_sun) {
new_sun.shine();
});
This commit makes a couple of simple modifications that allow declaring
signals and slots with rvalue reference parameter.
|
|
|
|
|
| |
It shall not be possible to find a sigc++ header file
with #include <xxx.h> instead of #include <sigc++/xxx.h>.
|
|
|
|
| |
mm-common can be a subproject of sigc++.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Change libsigc.sourceforge.net to
libsigcplusplus.github.io/libsigcplusplus.
|
|
|
|
| |
See pull request #65
|
|
|
|
| |
Pointed out by Chun-wei Fan in PR #51.
|
|
|
|
|
| |
This ensures that on Windows, the version info resources are indeed
linked into the libsigc++ DLL.
|
|
|
|
|
| |
We need to make sure that SIGC_BUILD and _WINDLL are defined when
building the libsigc++ DLL, so that it gets build properly.
|
|
|
|
| |
libsigc++-3.0 can be built with either Autotools or Meson.
|
|
|
|
|
| |
This expected a result_type type alias. Luckily, in the few places where
we use this, we always specify the type, ignoring the default.
|
| |
|
|
|
|
|
|
| |
It's used by sigc::visitor::do_visit_each().
Add a test case in tests/test_bind.cc.
Fixes #26
|
| |
|
|
|
| |
Added 'static_cast<void>(parameter-name)' in all paths where the parameter isn't used
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Copy constructor and `operator=` could fail if `src` was empty.
```
sigc::connection con1;
sigc::connection con2(con1); // failed
```
```
sigc::connection con3;
sigc::connection con4;
con3 = con4; // failed
```
|
|
|
|
|
|
|
|
|
| |
Tuples which are input data to std::tuple_cat() are not declared const.
Some versions of libc++ has a bug in std::tuple_cat(): All output
elements coming from a const tuple become const.
It can break 'make check' when using clang++ and -stdlib=libc++.
Fixes issue #25
|
|
|
|
|
|
| |
The number of objects and arguments are not restricted to max 7
now that variadic templates have replaced the .m4 files in libsigc++-2
that generated 7 copies.
|
| |
|
|
|
|
|
|
| |
std::result_of is deprecated in C++17 and will be removed in C++20.
Fixes issue #19
|
|
|
|
|
| |
* sigc++/adaptors/tuple_visitor_visit_each.h
* sigc++/reference_wrapper.h
|
|
|
|
|
|
| |
Hide the forward declarations of sigc::slot and sigc::signal from Doxygen.
If Doxygen sees the forward declarations, it does not care about what's
in the complete class definitions.
|
|
|
|
|
|
| |
Consolidate the source listing from sigc++/Makefile.am to
sigc++/filelist.am, so that we can let other Makefile-based
build systems consume sigc++/filelist.am as well.
|
|
|
|
|
|
|
|
|
|
| |
gcc8 -Wextra prints a warning when a single reinterpret_cast is used for
conversion between different types of function pointers. The previous fix
with a union in sigc::internal::bitwise_equivalent_cast<>() is not standard
C++. Rename the function to function_pointer_cast<>(), and use two
reinterpret_casts as recommended in gcc's documentation.
Fixes #8
|
|
|
|
|
| |
Otherwise indirect calls from glibmm, with its own bitwise_equivalent_cast(),
can be ambiguous due to ACL (argument-dependent lookup).
|
|
|
|
|
|
|
|
|
| |
gcc8 -Wextra prints a warning when reinterpret_cast is used for conversion
between different types of function pointers. Avoid that by adding
sigc::internal::bitwise_equivalent_cast<>() with a union with members of
the two types of function pointers.
Fixes #1
|
|
|
|
|
|
| |
This reverts commit c7dbcd5df0e6c260d50fe12dfb2b87a002d91985.
This can be done in a better way by keeping the union in a template function.
|
|
|
|
|
|
|
|
| |
gcc8 -Wextra prints a warning when reinterpret_cast is used for conversion
between different types of function pointers. Avoid that by instead using
a union with members of the two types of function pointers.
Fixes #1
|
|
|
|
|
| |
Update from murrayc-tuple-utils:
https://github.com/murraycu/murrayc-tuple-utils/commits/master
|
|
|
|
|
|
|
|
| |
From https://github.com/murraycu/murrayc-tuple-utils/commits/master
This also uses the C++17 nested namespace syntax.
Apart from tuple_transform_each, which seems to have a memory access
problem, with both g++ and clang++, in its C++17 version.
|