1
0
mirror of https://github.com/nlohmann/json.git synced 2025-07-28 12:02:00 +03:00

🚧 add fix from #1715

This commit is contained in:
Niels Lohmann
2020-05-20 22:20:40 +02:00
parent a82c80e9af
commit 225fa58f16
3 changed files with 28 additions and 4 deletions

View File

@ -4754,13 +4754,14 @@ inline input_stream_adapter input_adapter(std::istream&& stream)
return input_stream_adapter(stream);
}
template<typename CharT,
template<typename CharT, typename SizeT,
typename std::enable_if<
std::is_pointer<CharT>::value and
std::is_integral<typename std::remove_pointer<CharT>::type>::value and
not std::is_same<SizeT, bool>::value and
sizeof(typename std::remove_pointer<CharT>::type) == 1,
int>::type = 0>
input_buffer_adapter input_adapter(CharT b, std::size_t l)
input_buffer_adapter input_adapter(CharT b, SizeT l)
{
return input_buffer_adapter(reinterpret_cast<const char*>(b), l);
}