Move enable_if to template params

This commit is contained in:
Victor Zverovich
2019-03-16 15:15:38 -07:00
parent ec645ca262
commit c21c6b8c4b
9 changed files with 220 additions and 266 deletions
+4 -3
View File
@@ -639,9 +639,10 @@ struct shortest_handler {
}
};
template <typename Double>
FMT_FUNC typename std::enable_if<sizeof(Double) == sizeof(uint64_t), bool>::type
grisu2_format(Double value, buffer& buf, int precision, bool fixed, int& exp) {
template <typename Double, typename std::enable_if<
sizeof(Double) == sizeof(uint64_t), int>::type>
FMT_FUNC bool grisu2_format(Double value, buffer& buf, int precision,
bool fixed, int& exp) {
FMT_ASSERT(value >= 0, "value is negative");
if (value <= 0) { // <= instead of == to silence a warning.
if (precision < 0) {