summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKjell Ahlstedt <kjellahlstedt@gmail.com>2019-08-29 17:08:48 +0200
committerKjell Ahlstedt <kjellahlstedt@gmail.com>2019-08-29 17:08:48 +0200
commit959beb1cefcb4283bf124223e32f5b6247d2ceb3 (patch)
treec654f82f9308b68361bed5454924296d526870ee
parent4a691a1ecfd9b255807eabfb2f07da720f364217 (diff)
downloadsigc++-959beb1cefcb4283bf124223e32f5b6247d2ceb3.tar.gz
tests/test_track_obj.cc: Remove obsolete comments
-rw-r--r--tests/test_track_obj.cc15
1 files changed, 4 insertions, 11 deletions
diff --git a/tests/test_track_obj.cc b/tests/test_track_obj.cc
index 0680508..594d9cf 100644
--- a/tests/test_track_obj.cc
+++ b/tests/test_track_obj.cc
@@ -26,11 +26,6 @@
// See https://bugzilla.gnome.org/show_bug.cgi?id=672555
// - Test the code example in the documentation in sigc++/adaptors/track_obj.h.
//
-// To test the C++11 lambda expressions with gcc 4.6.3 (and probably some later
-// versions of gcc; gcc 4.7.x also understands -std=c++11):
-// make CXXFLAGS='-g -O2 -std=c++0x' test_track_obj
-// ./test_track_obj
-// echo $?
// If test_track_obj writes nothing and the return code is 0, the test has passed.
#include "testutilities.h"
@@ -191,18 +186,16 @@ main(int argc, char* argv[])
sl20();
util->check_result(result_stream, "");
- // Code example in the documentation sigc++/adaptors/macros/track_obj.h.m4
- // -----------------------------------------------------------------------
+ // Code example in the documentation sigc++/adaptors/track_obj.h.
+ // --------------------------------------------------------------
{
// struct bar : public sigc::trackable {} some_bar;
sigc::signal<void()> some_signal;
{
bar_group4 some_bar;
- // some_signal.connect(sigc::group(&foo, std::ref(some_bar)));
- // disconnected automatically if some_bar goes out of scope
// some_signal.connect([&some_bar](){ foo_group4(some_bar); }); // no auto-disconnect
- // some_signal.connect(sigc::bind(&foo_group4, std::ref(some_bar))); // auto-disconnects, but
- // we prefer C++11 lambda
+ // some_signal.connect(sigc::bind(&foo_group4, std::ref(some_bar))); // auto-disconnects,
+ // but we prefer C++11 lambda
some_signal.connect(sigc::track_obj([&some_bar]() { foo_group4(some_bar); }, some_bar));
some_signal.emit();
util->check_result(result_stream, "foo_group4(bar_group4&)");