From 5bcf61e9cd91be40cd556bae053e00b970ba79c2 Mon Sep 17 00:00:00 2001 From: cxl Date: Tue, 20 Sep 2011 06:23:38 +0000 Subject: [PATCH] Core: AsString for std::complex git-svn-id: svn://ultimatepp.org/upp/trunk@3891 f0d560ea-af0d-0410-9eb7-867de7ffcac7 --- uppsrc/Core/Complex.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/uppsrc/Core/Complex.h b/uppsrc/Core/Complex.h index 23cbceb8d..a3808e0ad 100644 --- a/uppsrc/Core/Complex.h +++ b/uppsrc/Core/Complex.h @@ -20,7 +20,8 @@ struct Complex : std::complex template<> inline bool IsNull(const Complex& r) { return r.real() < DOUBLE_NULL_LIM || r.imag() < DOUBLE_NULL_LIM; } template<> inline unsigned GetHashValue(const Complex& x) { return CombineHash(x.real(), x.imag()); } -template<> inline String AsString(const Complex& x) { return String().Cat() << "(" << x.real() << "," << x.imag() << ")"; } +template<> inline String AsString(const std::complex& x) { return String().Cat() << "(" << x.real() << "," << x.imag() << ")"; } +template<> inline String AsString(const Complex& x) { return AsString((const std::complex&)x); } template<> inline Stream& operator%(Stream& s, Complex& c) {