diff --git a/include/nlohmann/detail/input/input_adapters.hpp b/include/nlohmann/detail/input/input_adapters.hpp
index eb358432..5332a63f 100644
--- a/include/nlohmann/detail/input/input_adapters.hpp
+++ b/include/nlohmann/detail/input/input_adapters.hpp
@@ -168,9 +168,6 @@ class input_buffer_adapter : public input_adapter_protocol
 template<typename WideStringType>
 class wide_string_input_adapter : public input_adapter_protocol
 {
-  private:
-    using char_t = typename WideStringType::value_type;
-
   public:
     wide_string_input_adapter(const WideStringType& w) : str(w) {}
 
@@ -186,7 +183,7 @@ class wide_string_input_adapter : public input_adapter_protocol
         // check if buffer needs to be filled
         if (utf8_bytes_index == utf8_bytes_filled)
         {
-            if (sizeof(char_t) == 2)
+            if (sizeof(typename WideStringType::value_type) == 2)
             {
                 fill_buffer_utf16();
             }
@@ -223,7 +220,7 @@ class wide_string_input_adapter : public input_adapter_protocol
         else
         {
             // get the current character
-            const char_t wc = str[current_wchar++];
+            const int wc = static_cast<int>(str[current_wchar++]);
 
             // UTF-16 to UTF-8 encoding
             if (wc < 0x80)
@@ -248,7 +245,7 @@ class wide_string_input_adapter : public input_adapter_protocol
             {
                 if (current_wchar < str.size())
                 {
-                    const char_t wc2 = str[current_wchar++];
+                    const int wc2 = static_cast<int>(str[current_wchar++]);
                     const int charcode = 0x10000 + (((wc & 0x3FF) << 10) | (wc2 & 0x3FF));
                     utf8_bytes[0] = 0xf0 | (charcode >> 18);
                     utf8_bytes[1] = 0x80 | ((charcode >> 12) & 0x3F);
@@ -279,7 +276,7 @@ class wide_string_input_adapter : public input_adapter_protocol
         else
         {
             // get the current character
-            const char_t wc = str[current_wchar++];
+            const int wc = static_cast<int>(str[current_wchar++]);
 
             // UTF-32 to UTF-8 encoding
             if (wc < 0x80)
diff --git a/single_include/nlohmann/json.hpp b/single_include/nlohmann/json.hpp
index 33a07189..97c83d39 100644
--- a/single_include/nlohmann/json.hpp
+++ b/single_include/nlohmann/json.hpp
@@ -1741,9 +1741,6 @@ class input_buffer_adapter : public input_adapter_protocol
 template<typename WideStringType>
 class wide_string_input_adapter : public input_adapter_protocol
 {
-  private:
-    using char_t = typename WideStringType::value_type;
-
   public:
     wide_string_input_adapter(const WideStringType& w) : str(w) {}
 
@@ -1759,7 +1756,7 @@ class wide_string_input_adapter : public input_adapter_protocol
         // check if buffer needs to be filled
         if (utf8_bytes_index == utf8_bytes_filled)
         {
-            if (sizeof(char_t) == 2)
+            if (sizeof(typename WideStringType::value_type) == 2)
             {
                 fill_buffer_utf16();
             }
@@ -1796,7 +1793,7 @@ class wide_string_input_adapter : public input_adapter_protocol
         else
         {
             // get the current character
-            const char_t wc = str[current_wchar++];
+            const int wc = static_cast<int>(str[current_wchar++]);
 
             // UTF-16 to UTF-8 encoding
             if (wc < 0x80)
@@ -1821,7 +1818,7 @@ class wide_string_input_adapter : public input_adapter_protocol
             {
                 if (current_wchar < str.size())
                 {
-                    const char_t wc2 = str[current_wchar++];
+                    const int wc2 = static_cast<int>(str[current_wchar++]);
                     const int charcode = 0x10000 + (((wc & 0x3FF) << 10) | (wc2 & 0x3FF));
                     utf8_bytes[0] = 0xf0 | (charcode >> 18);
                     utf8_bytes[1] = 0x80 | ((charcode >> 12) & 0x3F);
@@ -1852,7 +1849,7 @@ class wide_string_input_adapter : public input_adapter_protocol
         else
         {
             // get the current character
-            const char_t wc = str[current_wchar++];
+            const int wc = static_cast<int>(str[current_wchar++]);
 
             // UTF-32 to UTF-8 encoding
             if (wc < 0x80)