scn namespace
scnlib namespace, containing the library interface
Classes
-
template <typename CharT>struct basic_istream_scanner
-
template <typename CharT>class basic_regex_match
-
template <typename CharT>class basic_regex_matches
-
template <typename Context>class basic_scan_arg
-
template <typename Context>class basic_scan_args
-
template <typename CharT>class basic_scan_context
-
template <typename CharT, typename Source, typename... Args>class basic_scan_format_string
-
template <typename CharT>class basic_scan_parse_context
-
template <typename T>struct discard
-
template <typename T, typename E>class expected
- struct invalid_input_range
- struct monostate
- Placeholder monostate type.
- class scan_error
-
template <typename T>struct scan_expected
-
template <typename Range, typename... Args>class scan_result
-
template <typename T, typename CharT = char, typename Enable = void>struct scanner
-
template <typename T, typename CharT>struct scanner<T, CharT, std::enable_if_t<detail::arg_type_constant<T, CharT>::value !=detail::arg_type::custom_type && !detail::is_type_disabled<T>>>
Typedefs
-
template <typename Source, typename... Args>using scan_result_type = scan_
expected<scan_ result<detail:: scan_result_value_type<Source>, Args...>>
Functions
-
template <typename... Args>auto input(scan_
format_ string<std:: FILE*, Args...> format) → scan_result_type< std::FILE *, Args... > -> auto -
template <typename Context = scan_context, typename... Args>auto make_scan_args() constexpr
-
template <typename Context = scan_context, typename... Args>auto make_scan_args(std::
tuple<Args...>&& values) → auto constexpr -
template <typename Result, typename... Args>auto make_scan_result(scan_
expected<Result>&& result, std:: tuple<Args...>&& args) → scan_expected< scan_result< Result, Args... >> -> auto -
template <typename... Args>auto prompt(const char* msg, scan_
format_ string<std:: FILE*, Args...> format) → scan_result_type< std::FILE *, Args... > -> auto -
auto runtime_format(std::
string_view s) → detail:: basic_runtime_format_string<char> -
template <typename... Args, typename Source, typename = std::auto scan(Source&& source, scan_
enable_if_t<detail::is_file_or_narrow_range<Source>>> format_ string<Source, Args...> format) → scan_result_type< Source, Args... > -> auto -
template <typename... Args, typename Source, typename = std::auto scan(Source&& source, scan_
enable_if_t<detail::is_file_or_narrow_range<Source>>> format_ string<Source, Args...> format, std:: tuple<Args...>&& initial_args) → scan_result_type< Source, Args... > -> auto -
template <typename... Args, typename Locale, typename Source, typename = std::auto scan(const Locale& loc, Source&& source, scan_
enable_if_t<detail::is_file_or_narrow_range<Source>>, typename = std:: void_t<decltype(Locale::classic())>> format_ string<Source, Args...> format) → scan_result_type< Source, Args... > -> auto -
template <typename... Args, typename Locale, typename Source, typename = std::auto scan(const Locale& loc, Source&& source, scan_
enable_if_t<detail::is_file_or_narrow_range<Source>>, typename = std:: void_t<decltype(Locale::classic())>> format_ string<Source, Args...> format, std:: tuple<Args...>&& initial_args) → scan_result_type< Source, Args... > -> auto -
template <typename T, std::auto scan_int(std::
enable_if_t<detail::is_scan_int_type<T>>* = nullptr> string_view source, int base = 10) → scan_result_type< std::string_view, T > -> auto -
template <typename T, std::auto scan_int_exhaustive_valid(std::
enable_if_t<detail::is_scan_int_type<T>>* = nullptr> string_view source) → T -> auto -
template <typename T, typename Source, typename = std::auto scan_value(Source&& source) → scan_result_type< Source, T > -> auto
enable_if_t<detail::is_file_or_narrow_range<Source>>> -
template <typename T, typename Source, std::auto scan_value(Source&& source, T initial_value) → scan_result_type< Source, T > -> auto
enable_if_t<detail::is_file_or_narrow_range<Source>>* = nullptr> -
auto vinput(std::
string_view format, scan_ args args) → scan_ error -
template <typename Visitor, typename Ctx>auto visit_scan_arg(Visitor&& vis, basic_
scan_ arg<Ctx>& arg) → decltype(auto) constexpr -
template <typename Source>auto vscan(Source&& source, std::
string_view format, scan_ args args) → vscan_result<Source> -
template <typename Source, typename Locale, typename = std::auto vscan(const Locale& loc, Source&& source, std::
void_t<decltype(Locale::classic())>> string_view format, scan_ args args) → vscan_result<Source> -
template <typename Range>auto vscan(Range&& range, std::
wstring_view format, wscan_ args args) → vscan_result<Range> -
template <typename Range, typename Locale, std::auto vscan(const Locale& loc, Range&& range, std::
void_t<decltype(Locale::classic())>* = nullptr> wstring_view format, wscan_ args args) → vscan_result<Range> -
template <typename Source>auto vscan_value(Source&& source, basic_
scan_ arg<scan_ context> arg) → vscan_result<Source> -
template <typename Range>auto vscan_value(Range&& range, basic_
scan_ arg<wscan_ context> arg) → vscan_result<Range>
Typedef documentation
template <typename Source, typename... Args>
using scn:: scan_result_type = scan_ expected<scan_ result<detail:: scan_result_value_type<Source>, Args...>>
The return type of scan
, based on the type of the source, and the types of the scanned arguments.
Function documentation
template <typename Context = scan_context, typename... Args>
auto scn:: make_scan_args() constexpr
Constructs a scan_arg_store
object, associated with Context
, that contains value-initialized values of types Args...
.
template <typename Context = scan_context, typename... Args>
auto scn:: make_scan_args(std:: tuple<Args...>&& values) constexpr
Constructs a scan_arg_store
object, associated with Context
, that contains values
.
template <typename Visitor, typename Ctx>
decltype(auto) scn:: visit_scan_arg(Visitor&& vis,
basic_ scan_ arg<Ctx>& arg) constexpr
Returns | vis(x) , where x is either a reference to the value contained in arg , or a basic_scan_arg:: . |
---|
Visit a basic_
with Visitor
. Calls vis
with the value stored in arg
. If no value is contained in arg
, calls vis
with a monostate
.