inline tstring x_To_tstring (const i_64 v) { return ::i64tot (v,10) ; }
inline tstring x_To_tstring (const u_64 v) { return ::u64tot (v,10) ; }
inline tstring x_To_tstring (const long v) { return ::i64tot (v,10) ; }
inline tstring x_To_tstring (const int v) { return ::i64tot (v,10) ; }
inline tstring x_To_tstring (const float v) { return ::To_tstring_rz (v,0, 7) ; }
inline tstring x_To_tstring (const double v) { return ::To_tstring_rz (v,0,15) ; }
template <class V2> tstring V2_To_tstring(const V2& vt,LPCTSTR sp=_T(" "))
{
tstring str = ::x_To_tstring(vt.x) + sp ;
str+= ::x_To_tstring(vt.y) + sp ;
return str ;
}
template <class V2> tstring V2_To_tstring(const std::vector<V2>& va,LPCTSTR sp2=_T("\t"),LPCTSTR sp=_T("\r\n"))
{
tstring str ;
for (size_t index=0 ; index<va.size() ; index++) {
str += ::V2_To_tstring<V2>(va[index],sp2) + sp ;
}
return str ;
}
次の様にすると, tstring pt_str = ::V2_To_tstring(pt2) ;
C:\...\T_SplVw.cpp(99) : error C2667: 'V2_To_tstring' : 2 個のオーバーロード関数があいまいで最適な変換ができません。
C:\...\T_SplVw.cpp(99) : error C2668: 'V2_To_tstring' : オーバーロード関数の呼び出しを解決することができません。(新機能 ; ヘルプを参照)
呼出し方法を忘れるので…
Vl2A pt2 ;
tstring pt_str = ::V2_To_tstring<Vl2>(pt2) ;
他にも,
::V2_To_tstring<Vd2>(::ToVd2A(tuvs)) ;