From df1ef68cd8e8582724ce1192bfc202e0b9aeaf0c Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Tue, 28 Sep 2021 19:24:31 +0300 Subject: Get rid of C++ modules related code and rename *.mxx files to *.hxx --- libbutl/prompt.hxx | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 libbutl/prompt.hxx (limited to 'libbutl/prompt.hxx') diff --git a/libbutl/prompt.hxx b/libbutl/prompt.hxx new file mode 100644 index 0000000..90b8dbf --- /dev/null +++ b/libbutl/prompt.hxx @@ -0,0 +1,20 @@ +// file : libbutl/prompt.hxx -*- C++ -*- +// license : MIT; see accompanying LICENSE file + +#pragma once + +#include + +#include + +namespace butl +{ + // The Y/N prompt. The def argument, if specified, should be either 'y' or + // 'n'. It is used as the default answer, in case the user just hits enter. + // + // Write the prompt to diag_stream. Throw ios_base::failure if no answer + // could be extracted from stdin (for example, because it was closed). + // + LIBBUTL_SYMEXPORT bool + yn_prompt (const std::string&, char def = '\0'); +} -- cgit v1.1