#ifndef __cxz_to_string_cc_h__ #define __cxz_to_string_cc_h__ #include "to_string.h" #include namespace CNORXZ { template String toString(const T& a) { std::stringstream ss; ss << a; return ss.str(); } template String toString>(const vector& a) { std::stringstream ss; ss << "["; auto it = a.begin(); for(; it != a.end()-1; ++it){ ss << *it << ","; } ss << *it << "]"; return ss.str(); } template String toString>(const std::array& a) { std::stringstream ss; ss << "("; auto it = a.begin(); for(; it != a.end()-1; ++it){ ss << *it << ","; } ss << *it << ")"; return ss.str(); } template <> String toString(const DType& a) { return a.str(); } } #endif