scn namespace
scnlib namespace, containing the library interface
Namespaces
- namespace ranges
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 Range, 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
- struct datetime_components
-
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>>>
-
template <typename E>class unexpected
Typedefs
-
template <typename Source, typename... Args>using scan_result_type = scan_
expected<scan_ result<detail:: scan_result_value_type<Source>, Args...>>
Functions
-
template <typename Result, typename Range, std::void fill_scan_result(scan_
enable_if_t<std:: conjunction_v<detail::is_specialization_of<Result, scan_result>, std:: is_same<typename Result::range_type, Range>>>* = nullptr> expected<Result>& out, scan_ expected<Range>&& in) -
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(std::
tuple<Args...>& values) → auto constexpr -
template <typename Source, typename... Args>auto make_scan_result()
-
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_ expected<void> -
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 Result, typename Range, std:: enable_if_t<std:: conjunction_v<detail::is_specialization_of<Result, scan_result>, std:: is_same<typename Result::range_type, Range>>>* = nullptr>
void scn:: fill_scan_result(scan_ expected<Result>& out,
scan_ expected<Range>&& in)
If in
contains a successful result as returned from vscan
, the range contained in out
is set to *in
. Otherwise, unexpected(in.error())
is stored in out
.
template <typename Context = scan_context, typename... Args>
auto scn:: make_scan_args(std:: tuple<Args...>& values) constexpr
Creates a type-erased argument store over the arguments in values
.
template <typename Source, typename... Args>
auto scn:: make_scan_result()
Returns an empty result type for a source of type Source
, and arguments of type Args...
.