File tree 2 files changed +28
-8
lines changed
include/nlohmann/detail/meta
2 files changed +28
-8
lines changed Original file line number Diff line number Diff line change @@ -199,12 +199,17 @@ struct char_traits<unsigned char> : std::char_traits<char>
199
199
using int_type = uint64_t ;
200
200
201
201
// Redefine to_int_type function
202
- static int_type to_int_type (char_type c)
202
+ static int_type to_int_type (char_type c) noexcept
203
203
{
204
204
return static_cast <int_type>(c);
205
205
}
206
206
207
- static constexpr int_type eof ()
207
+ static char_type to_char_type (int_type i) noexcept
208
+ {
209
+ return static_cast <char_type>(i);
210
+ }
211
+
212
+ static constexpr int_type eof () noexcept
208
213
{
209
214
return static_cast <int_type>(EOF);
210
215
}
@@ -218,12 +223,17 @@ struct char_traits<signed char> : std::char_traits<char>
218
223
using int_type = uint64_t ;
219
224
220
225
// Redefine to_int_type function
221
- static int_type to_int_type (char_type c)
226
+ static int_type to_int_type (char_type c) noexcept
222
227
{
223
228
return static_cast <int_type>(c);
224
229
}
225
230
226
- static constexpr int_type eof ()
231
+ static char_type to_char_type (int_type i) noexcept
232
+ {
233
+ return static_cast <char_type>(i);
234
+ }
235
+
236
+ static constexpr int_type eof () noexcept
227
237
{
228
238
return static_cast <int_type>(EOF);
229
239
}
Original file line number Diff line number Diff line change @@ -3606,12 +3606,17 @@ struct char_traits<unsigned char> : std::char_traits<char>
3606
3606
using int_type = uint64_t;
3607
3607
3608
3608
// Redefine to_int_type function
3609
- static int_type to_int_type(char_type c)
3609
+ static int_type to_int_type(char_type c) noexcept
3610
3610
{
3611
3611
return static_cast<int_type>(c);
3612
3612
}
3613
3613
3614
- static constexpr int_type eof()
3614
+ static char_type to_char_type(int_type i) noexcept
3615
+ {
3616
+ return static_cast<char_type>(i);
3617
+ }
3618
+
3619
+ static constexpr int_type eof() noexcept
3615
3620
{
3616
3621
return static_cast<int_type>(EOF);
3617
3622
}
@@ -3625,12 +3630,17 @@ struct char_traits<signed char> : std::char_traits<char>
3625
3630
using int_type = uint64_t;
3626
3631
3627
3632
// Redefine to_int_type function
3628
- static int_type to_int_type(char_type c)
3633
+ static int_type to_int_type(char_type c) noexcept
3629
3634
{
3630
3635
return static_cast<int_type>(c);
3631
3636
}
3632
3637
3633
- static constexpr int_type eof()
3638
+ static char_type to_char_type(int_type i) noexcept
3639
+ {
3640
+ return static_cast<char_type>(i);
3641
+ }
3642
+
3643
+ static constexpr int_type eof() noexcept
3634
3644
{
3635
3645
return static_cast<int_type>(EOF);
3636
3646
}
You can’t perform that action at this time.
0 commit comments