Commit 6e2d530d authored by Brian Wellington's avatar Brian Wellington Committed by Wouter van Oortmerssen

Fix incorrect code generation on Solaris Sparc. (#5208)

On Solaris Sparc, calling NumToString() with a char called the primary
version, not the signed char or unsigned char specializations, which
caused integer to string conversions to be missed.
parent 9bf9b18f
......@@ -130,6 +130,9 @@ template<> inline std::string NumToString<signed char>(signed char t) {
template<> inline std::string NumToString<unsigned char>(unsigned char t) {
return NumToString(static_cast<int>(t));
}
template<> inline std::string NumToString<char>(char t) {
return NumToString(static_cast<int>(t));
}
#if defined(FLATBUFFERS_CPP98_STL)
template<> inline std::string NumToString<long long>(long long t) {
char buf[21]; // (log((1 << 63) - 1) / log(10)) + 2
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment