summaryrefslogtreecommitdiff
path: root/2005/i/robert/src/utils/test_bind.cc
diff options
context:
space:
mode:
Diffstat (limited to '2005/i/robert/src/utils/test_bind.cc')
-rw-r--r--2005/i/robert/src/utils/test_bind.cc16
1 files changed, 14 insertions, 2 deletions
diff --git a/2005/i/robert/src/utils/test_bind.cc b/2005/i/robert/src/utils/test_bind.cc
index 9ebdc4e..b883cbe 100644
--- a/2005/i/robert/src/utils/test_bind.cc
+++ b/2005/i/robert/src/utils/test_bind.cc
@@ -37,9 +37,21 @@ g (const char *s)
std::cout << "g " << s << std::endl;
}
+class H
+{
+ public:
+ void f (void)
+ {
+ std::cout << "h" << std::endl;
+ }
+};
+
int
main (void)
{
- utils::bind<void> (&f, 42) ();
- utils::bind<void> (&g, "hello world !") ();
+ // Create the callback and execute it.
+ bind<void> (&f, 42) ();
+ bind<void> (&g, "hello world !") ();
+ H h;
+ bind<void, H> (&H::f, &h) ();
}