thiru-mg commented on code in PR #3277:
URL: https://github.com/apache/avro/pull/3277#discussion_r1900316640
##########
lang/c++/impl/json/JsonIO.hh:
##########
@@ -415,9 +431,10 @@ public:
void encodeNumber(double t) {
Review Comment:
We can have a single specialization for `float` and `double`:
```
template<typename T>
typename std::enable_if<std::is_floating_point<T>::value, void>::type
encodeNumber(T t) {
// implementation common to float/double
}
template<typename T>
typename std::enable_if<!std::is_floating_point<T>::value, void>::type
encodeNumber(T t) {
// implementation for all other types
}
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]