xtd 0.2.0
delegate_lambda.cpp

Shows how to use xtd::delegate class.

#include <xtd/console>
#include <xtd/delegate>
#include <xtd/environment>
using namespace xtd;
auto main() -> int {
// use delegate as std::function
auto writer = delegate<void(const string& str)> {[](const string & str) {
}};
writer("Value to write");
}
// This code produces the following output :
//
// Hello, World!
static std::ostream out
Gets the standard output stream. A std::basic_ostream<char_t> that represents the standard output str...
Definition console.hpp:52
static xtd::string new_line() noexcept
Gets the newline string defined for this environment.
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition abstract_object.hpp:8