mirror of
https://github.com/reactos/CMake.git
synced 2024-12-13 06:16:49 +00:00
d9fd2f5402
Run the `Utilities/Scripts/clang-format.bash` script to update all our C++ code to a new style defined by `.clang-format`. Use `clang-format` version 3.8. * If you reached this commit for a line in `git blame`, re-run the blame operation starting at the parent of this commit to see older history for the content. * See the parent commit for instructions to rebase a change across this style transition commit.
30 lines
469 B
C++
30 lines
469 B
C++
// Taken from https://developer.gnome.org/libsigc++-tutorial/stable/ch02.html
|
|
|
|
#include <iostream>
|
|
#include <sigc++/sigc++.h>
|
|
|
|
class AlienDetector
|
|
{
|
|
public:
|
|
AlienDetector() {}
|
|
|
|
void run() {}
|
|
|
|
sigc::signal<void> signal_detected;
|
|
};
|
|
|
|
void warn_people()
|
|
{
|
|
std::cout << "There are aliens in the carpark!" << std::endl;
|
|
}
|
|
|
|
int main()
|
|
{
|
|
AlienDetector mydetector;
|
|
mydetector.signal_detected.connect(sigc::ptr_fun(warn_people));
|
|
|
|
mydetector.run();
|
|
|
|
return 0;
|
|
}
|