xieite::term::canon()

Defined in header <xieite/io/term.hpp>

Enables or disables canonical input (reading input without waiting for a newline).


Declaration

void canon(bool x) noexcept;


Example

int main() {
	using namespace std::literals;

	xieite::term term;
	term.canon(false);

	std::this_thread::sleep_for(5s);

	std::puts(term.read_str().c_str());
}
Possible output:
Hello, world!