C++は難しすぎ 難易度:2 at TECH
[2ch|▼Menu]
649:デフォルトの名無しさん
06/05/25 13:51:00
>>648
普通のオーバーロードだとこれが動かない。
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);


次ページ
続きを表示
1を表示
最新レス表示
スレッドの検索
類似スレ一覧
話題のニュース
おまかせリスト
▼オプションを表示
暇つぶし2ch

5374日前に更新/241 KB
担当:undef