- 717 名前:デフォルトの名無しさん [2014/03/23(日) 11:36:21.59 ID:sV6DQ8Cb]
- template <class T1, class T2>
auto operator + (T1 x, T2 y) -> decltype(x+y) { return x+y; } 上のところで、 error: template instantiation depth exceeds maximum of 900・・・ recursively required by substitution of 'template<class T1, class T2> decltype ((x + y)) operator+(T1, T2) [with T1 = std::complex<double>; T2 = double] みたいなエラーがでます(gcc4.8.1)。これって、decltype(x+y)のところで、operator+が再帰的に呼ばれているということですか?
|

|