Adding a put API to basic_format_context.
This commit is contained in:
parent
ae1aaaee5f
commit
931cfcfbbe
@ -1776,6 +1776,15 @@ template <typename OutputIt, typename Char> class basic_format_context {
|
||||
if (!detail::is_back_insert_iterator<iterator>()) out_ = it;
|
||||
}
|
||||
|
||||
FMT_CONSTEXPR auto put(char_type c) -> iterator {
|
||||
*out_++ = c;
|
||||
return out;
|
||||
}
|
||||
FMT_CONSTEXPR auto put(basic_string_view<char_type> sv) -> iterator {
|
||||
detail::copy_str<char_type>(sv.data(), sv.data() + sv.size(), out);
|
||||
return out;
|
||||
}
|
||||
|
||||
FMT_CONSTEXPR auto locale() -> detail::locale_ref { return loc_; }
|
||||
};
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user