File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2222
2323#include < algorithm>
2424#include < cmath>
25- #include < sstream>
2625
2726#include " common_defs.hpp"
2827#include " memory_operations.hpp"
@@ -32,18 +31,14 @@ namespace datasketches {
3231template <typename T>
3332inline void check_not_nan (T value, const char * name) {
3433 if (std::isnan (value)) {
35- std::ostringstream oss;
36- oss << name << " must not be NaN" ;
37- throw std::invalid_argument (oss.str ());
34+ throw std::invalid_argument (std::string (name) + " must not be NaN" );
3835 }
3936}
4037
4138template <typename T>
4239inline void check_not_infinite (T value, const char * name) {
4340 if (std::isinf (value)) {
44- std::ostringstream oss;
45- oss << name << " must not be infinite" ;
46- throw std::invalid_argument (oss.str ());
41+ throw std::invalid_argument (std::string (name) + " must not be infinite" );
4742 }
4843}
4944
You can’t perform that action at this time.
0 commit comments