Shows how to use xtd::delegate class.
#include <xtd/console>
#include <xtd/delegate>
void goodbye(
const string&
s) {
}
public:
void hello(
const string&
s) {
}
};
auto main() -> int {
using example_function = delegate<void(const string&)>;
auto str = string {"World"};
auto f = example_function {instance, &::object::hello};
return 0;
}
static void write_line()
Writes the current line terminator to the standard output stream using the specified format informati...
Supports all classes in the xtd class hierarchy and provides low-level services to derived classes....
Definition object.hpp:44
@ s
The S key.
Definition console_key.hpp:124
@ f
The F key.
Definition console_key.hpp:98
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition abstract_object.hpp:8