Files
CMake/Tests/FindGTK2/sigc++/main.cpp
Kitware Robot ed98209ddc Revise include order using clang-format-6.0
Run the `clang-format.bash` script to update our C and C++ code to a new
include order `.clang-format`.  Use `clang-format` version 6.0.
2019-10-01 12:26:36 -04:00

31 lines
470 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;
}