Fixed error with string of type unsigned char* (issue #428)

This commit is contained in:
Benoit Blanchon
2017-01-22 15:42:47 +01:00
parent a096098c1f
commit d4f725d1fa
10 changed files with 394 additions and 31 deletions

View File

@@ -37,5 +37,17 @@ struct ValueSetter<TSource, typename TypeTraits::EnableIf<StringTraits<
return true;
}
};
template <typename TSource>
struct ValueSetter<TSource, typename TypeTraits::EnableIf<!StringTraits<
TSource>::should_duplicate>::type> {
template <typename TDestination>
static bool set(JsonBuffer*, TDestination& destination,
const TSource& source) {
// unsigned char* -> char*
destination = reinterpret_cast<const char*>(source);
return true;
}
};
}
}