- 735 名前:デフォルトの名無しさん [2014/03/24(月) 22:27:29.45 ID:uHELE/QG]
- VC++2013を未だインストールしてないので、次のコード動くか確かめてもらえないでしょうか?
#include "stdafx.h" template <class T> struct double_trait { typedef T type; }; template <class T> using dtype=typename double_trait<T>::type; template <class T> std::complex<T> operator + (dtype<T> c, const std::complex<T>& z) //@ { return c+z; } int main() { using namespace std; complex<double> z(0,1); char c=-1; cout<<c+z<<endl; cin.get(); return 0; }
|

|