C++は難しすぎ 難易度:2
■ このスレッドは過去ログ倉庫に格納されています
0649デフォルトの名無しさん
2006/05/25(木) 13:51:00普通のオーバーロードだとこれが動かない。
template <class T>
std::complex<T> operator+(std::complex<T> a1, std::complex<T> a2);
namespace std {
template <class T>
struct plus : public std::binary_function<T, T, T> {
T operator()(const T &a1, const T &a2) const
{ return a1 + a2; }
};
}
template <class T>
std::valarray<T> operator+(std::valarray<T> a1, std::valarray<T> a2);
■ このスレッドは過去ログ倉庫に格納されています