summaryrefslogtreecommitdiff
path: root/tests/test_bind.cc
diff options
context:
space:
mode:
authorMurray Cumming <murrayc@murrayc.com>2005-04-26 10:34:40 +0000
committerMurray Cumming <murrayc@src.gnome.org>2005-04-26 10:34:40 +0000
commit6b150419bb219d0ea7b0e3cb8bc27b39b08b945a (patch)
treee5085cdf2ad819e71ddb4fdc480ea6264e5af5af /tests/test_bind.cc
parent1f4ab38d9c9deaeec844fedce6c25ee5a8230cf0 (diff)
downloadsigc++-6b150419bb219d0ea7b0e3cb8bc27b39b08b945a.tar.gz
Use the explicit template specialization, needed for Tru64 and AIX
2005-04-26 Murray Cumming <murrayc@murrayc.com> * sigc++/visit_each.h: Use the explicit template specialization, needed for Tru64 and AIX compilers. This causes a crash in some uses of sigc::ref() (when using g++ 3.3.4 or 3.3.5 , but not with 3.4) but seems to fix a crash in some uses of multiple inheritance (bug #169225). * tests/test_bind.cc: Comment out the crashing (not with g++ 3.4) use of sigc::ref() with an explanatory comment.
Diffstat (limited to 'tests/test_bind.cc')
-rw-r--r--tests/test_bind.cc8
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/test_bind.cc b/tests/test_bind.cc
index 2739004..7f33e9e 100644
--- a/tests/test_bind.cc
+++ b/tests/test_bind.cc
@@ -92,7 +92,7 @@ int main()
// test references
std::string str("guest book");
- sigc::bind(&egon,sigc::ref(str))(); // Tell bind that is shall store a reference.
+ sigc::bind(&egon, sigc::ref(str))(); // Tell bind that is shall store a reference.
std::cout << str << std::endl; // (This cannot be the default behaviour: just think about what happens if str dies!)
sigc::slot<void> sl;
@@ -102,5 +102,9 @@ int main()
sl();
std::cout << static_cast<std::string&>(guest_book) << std::endl;
} // auto-disconnect
- sl(); // :-)
+
+ //sl();
+ // This causes a crash when using g++ 3.3.4 or 3.3.5 (but not 3.4.x) when not specifying the exact template
+ // specialization in visit_each_type() - see the comments there.
+ // It looks like the auto-disconnect does not work, so the last sl() call tries to access the guest_book data again.
}