diff options
-rw-r--r-- | gentoobrowse-api/domain/converters.impl.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gentoobrowse-api/domain/converters.impl.h b/gentoobrowse-api/domain/converters.impl.h index 97cc4b0..10afa79 100644 --- a/gentoobrowse-api/domain/converters.impl.h +++ b/gentoobrowse-api/domain/converters.impl.h @@ -9,10 +9,10 @@ namespace Slicer { public: UnpackPqTextArrayInto(std::istream & s, std::vector<T> & l) : UnpackPqTextArray(s), list(l) { } - virtual void + void consume(const std::string & s) override { - if constexpr (std::is_arithmetic<T>::value) { + if constexpr (std::is_arithmetic_v<T>) { if (std::from_chars(s.c_str(), s.c_str() + s.length(), list.emplace_back()).ec != std::error_code {}) { throw std::domain_error {"Invalid arithmetic input"}; } @@ -30,7 +30,7 @@ namespace Slicer { void packPqVar(std::ostream & s, const T & l) { - if constexpr (std::is_arithmetic<T>::value) { + if constexpr (std::is_arithmetic_v<T>) { s << l; } else { |