Remove require_wchar and internalize no_formatter_error

This commit is contained in:
Victor Zverovich
2018-09-21 18:25:24 -07:00
parent ec0cdc46f6
commit 715f2b4c00
2 changed files with 10 additions and 26 deletions
+2 -4
View File
@@ -2740,9 +2740,8 @@ class basic_writer {
void write(char value) {
*reserve(1) = value;
}
void write(wchar_t value) {
internal::require_wchar<char_type>();
static_assert(std::is_same<char_type, wchar_t>::value, "");
*reserve(1) = value;
}
@@ -2755,9 +2754,8 @@ class basic_writer {
auto &&it = reserve(value.size());
it = std::copy(value.begin(), value.end(), it);
}
void write(wstring_view value) {
internal::require_wchar<char_type>();
static_assert(std::is_same<char_type, wchar_t>::value, "");
auto &&it = reserve(value.size());
it = std::copy(value.begin(), value.end(), it);
}