test_bss.cxx
Go to the documentation of this file.
1 #include <boost/signals2.hpp>
2 #include <iostream>
3 
5 {
6  int count;
7  CountOutLoud(int c=0) : count(c) {}
8 
9  void operator()() {
10  std::cout << "count: " << count << std::endl;
11  ++count;
12  }
13 };
14 
15 int main()
16 {
17  // Signal with no arguments and a void return value
18  boost::signals2::signal<void ()> sig;
19 
20  CountOutLoud col;
21  sig.connect(col);
22 
23  sig();
24  sig();
25  sig();
26 }
CountOutLoud(int c=0)
Definition: test_bss.cxx:7
void operator()()
Definition: test_bss.cxx:9
int main()
Definition: test_bss.cxx:15
QTextStream & endl(QTextStream &s)