diff --git a/bezier.cpp b/bezier.cpp index 2a60ec24..215a94b4 100644 --- a/bezier.cpp +++ b/bezier.cpp @@ -440,8 +440,8 @@ util::operator<< (std::ostream &os, const bezier &b) os << "["; std::transform (std::cbegin (b), std::cend (b), - infix_iterator> (os, ", "), - stream::to_numeric); + infix_iterator (os, ", "), + [] (auto i) { return +i; }); os << "]"; return os; diff --git a/coord/iostream.hpp b/coord/iostream.hpp index 3b6386fb..c95b0d7f 100644 --- a/coord/iostream.hpp +++ b/coord/iostream.hpp @@ -18,7 +18,6 @@ #define __UTIL_IOSTREAM #include "../iterator.hpp" -#include "../stream.hpp" #include #include @@ -35,10 +34,8 @@ namespace util { os << "["; std::transform (std::cbegin (k), std::cend (k), - infix_iterator< - stream::numeric - > (os, ", "), - stream::to_numeric); + infix_iterator (os, ", "), + [] (auto i) { return +i; }); os << "]"; return os; diff --git a/stream.hpp b/stream.hpp index 2b2e306e..3f8ccfbf 100644 --- a/stream.hpp +++ b/stream.hpp @@ -18,37 +18,9 @@ #define __UTIL_STREAM_HPP #include -#include "types/bits.hpp" namespace util { namespace stream { - /////////////////////////////////////////////////////////////////////// - template - struct numeric - { - explicit numeric (T _val): val (_val) { ; } - T val; - }; - - - //--------------------------------------------------------------------- - template - numeric - to_numeric (const T &t) - { - return numeric (t); - } - - - //--------------------------------------------------------------------- - template - std::ostream& - operator<< (std::ostream &os, numeric n) - { - return os << +n.val; - } - - /////////////////////////////////////////////////////////////////////// class null_streambuf : public std::basic_streambuf { public: