Localization module
Scanning APIs that allow passing in a locale.
Functions
-
template <typename... Args, typename Locale, typename Source, typename = std::auto scan(const Locale& loc, Source&& source, scan_format_string<Source, Args...> format) → scan_result_type< Source, Args... > -> auto
enable_if_t<detail::is_file_or_narrow_range<Source>>, typename = std:: void_t<decltype(Locale::classic())>> -
template <typename... Args, typename Locale, typename Source, typename = std::auto scan(const Locale& loc, Source&& source, scan_format_string<Source, Args...> format, std::
enable_if_t<detail::is_file_or_narrow_range<Source>>, typename = std:: void_t<decltype(Locale::classic())>> tuple<Args...>&& default_args) → scan_result_type< Source, Args... > -> auto -
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>
Function documentation
template <typename... Args, typename Locale, typename Source, typename = std:: enable_if_t<detail::is_file_or_narrow_range<Source>>, typename = std:: void_t<decltype(Locale::classic())>>
auto scan(const Locale& loc,
Source&& source,
scan_format_string<Source, Args...> format) → scan_result_type< Source, Args... >
scan
using an explicit locale.
Has no effect on its own, locale-specific scanning still needs to be opted-into on an argument-by-argument basis, with the L
format string specifier.
auto result = scn::scan<double>( std::locale{"fi_FI.UTF-8"}, "3,14, "{:L}"); // result->value() == 3.14
template <typename... Args, typename Locale, typename Source, typename = std:: enable_if_t<detail::is_file_or_narrow_range<Source>>, typename = std:: void_t<decltype(Locale::classic())>>
auto scan(const Locale& loc,
Source&& source,
scan_format_string<Source, Args...> format,
std:: tuple<Args...>&& default_args) → scan_result_type< Source, Args... >
scan
with a locale and default values
template <typename Source, typename Locale, typename = std:: void_t<decltype(Locale::classic())>>
vscan_result<Source> vscan(const Locale& loc,
Source&& source,
std:: string_view format,
scan_args args)
Perform actual scanning from source
, according to format
, into the type-erased arguments at args
, using loc
, if requested. Called by scan
.