Ranges wide strings support (#2236)

* Ranges copy wchar_t

* arg_join formatter not working for wide strings

* Added ranges wide string tests

Co-authored-by: Cristi <cristi@emailaddressmanager.com>
This commit is contained in:
crbrz
2021-04-16 06:25:35 -07:00
committed by GitHub
co-authored by Cristi
parent 24c9751558
commit 9260114162
3 changed files with 26 additions and 1 deletions
+1 -1
View File
@@ -3720,7 +3720,7 @@ struct formatter<arg_join<It, Sentinel, Char>, Char> {
private:
using value_type = typename std::iterator_traits<It>::value_type;
using formatter_type =
conditional_t<has_formatter<value_type, format_context>::value,
conditional_t<has_formatter<value_type, buffer_context<Char>>::value,
formatter<value_type, Char>,
detail::fallback_formatter<value_type, Char>>;
+6
View File
@@ -67,6 +67,12 @@ OutputIterator copy(char ch, OutputIterator out) {
return out;
}
template <typename OutputIterator>
OutputIterator copy(wchar_t ch, OutputIterator out) {
*out++ = ch;
return out;
}
/// Return true value if T has std::string interface, like std::string_view.
template <typename T> class is_like_std_string {
template <typename U>