| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
Make the build_tests check more like the check in cairomm and libxml++.
Then it's possible to combine build-tests=false with benchmark=true.
See PR#84
|
|
|
|
| |
Fixes #82
|
| |
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
The return values of sigc::bind() and sigc::bind_return() shall be
converted to sigc::slot, otherwise automatic disconnection does not work.
Fixes #44
|
|
|
|
|
|
| |
A slot made with signal_with_accumulator::make_slot() is then
automatically disconnected when the signal is deleted, as in sigc++2.
Fixes #80
|
|
|
|
|
| |
track_object() checks that the listed objects derive from sigc::trackable.
Fixes #78
|
|
|
|
|
|
| |
The default value will be changed in future Meson releases.
Don't use deprecated python3.path() and execute(..., gui_app: ...).
|
| |
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
| |
|
|
|
|
| |
mm-common can be a subproject of sigc++.
|
| |
|
|
|
|
| |
murrayc-tuple-utils Pull Request #4 .
|
|
|
|
| |
libsigc++-3.0 can be built with either Autotools or Meson.
|
|
|
|
|
|
| |
This was apparently related to some long-since removed libsigc++ support
for a non-standard a gcc typeof() extension.
https://gcc.gnu.org/onlinedocs/gcc/Typeof.html
|
|
|
|
|
|
| |
But, as with test_ptr_fun(), we need to specify the types.
The compiler doesn't seem to be able to figure it out based on the
values passed.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
"= delete" Bases's move operations because the defaulted one
would call non-trivial assignment operators in the virtual bases.
This avoids this compiler warning, at least with g++ 9.2:
test_limit_reference.cc:12:7: error: defaulted move assignment for ‘{anonymous}::Base’ calls a non-trivial move assignment operator for virtual base ‘sigc::trackable’ [-Werror=virtual-move-assign]
12 | class Base : virtual public sigc::trackable
| ^~~~
test_limit_reference.cc:22:7: error: defaulted move assignment for ‘{anonymous}::Derived’ calls a non-trivial move assignment operator for virtual base ‘{anonymous}::Base’ [-Werror=virtual-move-assign]
22 | class Derived : virtual public Base, public Base2
It would be nice if this test had a comment saying what it is testing.
|
|
|
|
| |
This was necessary with older pre-C++11 versions of libsigc++.
|
| |
|
|
|
|
|
|
| |
It's used by sigc::visitor::do_visit_each().
Add a test case in tests/test_bind.cc.
Fixes #26
|
| |
|
|
|
|
|
|
|
|
| |
Use 'cmake -E env ... <test-executable>' to execute the test executable.
The '-E env' option allows the environment to be altered for the executed test.
Use generator expressions to retrieve the build directory/file for the
sigc++ & test targets
|
|
|
|
|
| |
For now, this just confirms that we can now copy empty sigc::connection
instances. (See the previous commit.)
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
clang++ complains if private members are unused, so make them protected.
error: private field 'bar_' is not used [-Werror,-Wunused-private-field]
|
|
|
|
| |
See pull request #15
|
|
|
|
|
| |
Some compilers do insist that <string> be included so that things like
to_string() and stoi() becomes part of the std namespace.
|
|
|
|
|
|
| |
Because we really do want to test this.
We do not explicitly promise that it's safe to use moved-from libsigc++
objects, but we choose to make it safe.
|
|
|
|
|
| |
I don't think there is any reason not to.
Noticed by clang-tidy.
|
|
|
|
| |
Noticed by clang-tidy.
|
|
|
|
| |
Noticed by clang-tidy.
|
|
|
|
| |
Noticed by clang-tidy.
|
|
|
|
| |
Noticed by clang-tidy.
|
|
|
|
| |
Call it both during signal emission and otherwise. Bug 784550
|
|
|
|
|
| |
We don't actually call the function, but it avoids an inspection
warning from Jetbrains CLion, and doesn't seem unreasonable.
|
|
|
|
| |
Found by Jetbrains CLion.
|
|
|
|
|
| |
This shell script runs the test cases with valgrind, searching for
memory leaks. Bug 775871
|
|
|
|
| |
Noticed by cppcheck.
|
| |
|