Borderou de evaluare (job #1424154)

Utilizator tamionvTamio Vesa Nakajima tamionv Data 23 aprilie 2015 17:11:31
Problema Al k-lea termen Fibonacci Status done
Runda Arhiva educationala Compilator cpp | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: user.cpp: In instantiation of ‘constexpr T exp(const T&, int, const T&) [with T = std::array<std::array<long unsigned int, 2u>, 2u>]’: user.cpp:28:42: required from here user.cpp:24:32: error: no match for ‘operator*’ (operand types are ‘const std::array<std::array<long unsigned int, 2u>, 2u>’ and ‘const std::array<std::array<long unsigned int, 2u>, 2u>’) return (x!=0) ? ((x&1) ? exp(e*e, x/2, rez*e) : exp(e*e, x/2, rez)) : rez; } ^ user.cpp:24:32: note: candidate is: user.cpp:12:14: note: template<class T, long unsigned int N, long unsigned int M, long unsigned int K> mat<T, K, M> operator*(mat<T, N, M>&, mat<T, K, N>&) mat<T, K, M> operator*(const mat<T, N, M>& A, const mat<T, K, N>& B){ ^ user.cpp:12:14: note: template argument deduction/substitution failed: user.cpp:24:32: note: mismatched types ‘long unsigned int’ and ‘#‘integer_cst’ not supported by dump_type#<type error>’ return (x!=0) ? ((x&1) ? exp(e*e, x/2, rez*e) : exp(e*e, x/2, rez)) : rez; } ^ user.cpp:24:32: note: ‘const std::array<std::array<long unsigned int, 2u>, 2u>’ is not derived from ‘mat<T, N, M>’ user.cpp:24:44: error: no match for ‘operator*’ (operand types are ‘const std::array<std::array<long unsigned int, 2u>, 2u>’ and ‘const std::array<std::array<long unsigned int, 2u>, 2u>’) return (x!=0) ? ((x&1) ? exp(e*e, x/2, rez*e) : exp(e*e, x/2, rez)) : rez; } ^ user.cpp:24:44: note: candidate is: user.cpp:12:14: note: template<class T, long unsigned int N, long unsigned int M, long unsigned int K> mat<T, K, M> operator*(mat<T, N, M>&, mat<T, K, N>&) mat<T, K, M> operator*(const mat<T, N, M>& A, const mat<T, K, N>& B){ ^ user.cpp:12:14: note: template argument deduction/substitution failed: user.cpp:24:44: note: mismatched types ‘long unsigned int’ and ‘#‘integer_cst’ not supported by dump_type#<type error>’ return (x!=0) ? ((x&1) ? exp(e*e, x/2, rez*e) : exp(e*e, x/2, rez)) : rez; } ^ user.cpp:24:44: note: ‘const std::array<std::array<long unsigned int, 2u>, 2u>’ is not derived from ‘mat<T, N, M>’ user.cpp:24:55: error: no match for ‘operator*’ (operand types are ‘const std::array<std::array<long unsigned int, 2u>, 2u>’ and ‘const std::array<std::array<long unsigned int, 2u>, 2u>’) return (x!=0) ? ((x&1) ? exp(e*e, x/2, rez*e) : exp(e*e, x/2, rez)) : rez; } ^ user.cpp:24:55: note: candidate is: user.cpp:12:14: note: template<class T, long unsigned int N, long unsigned int M, long unsigned int K> mat<T, K, M> operator*(mat<T, N, M>&, mat<T, K, N>&) mat<T, K, M> operator*(const mat<T, N, M>& A, const mat<T, K, N>& B){ ^ user.cpp:12:14: note: template argument deduction/substitution failed: user.cpp:24:55: note: mismatched types ‘long unsigned int’ and ‘#‘integer_cst’ not supported by dump_type#<type error>’ return (x!=0) ? ((x&1) ? exp(e*e, x/2, rez*e) : exp(e*e, x/2, rez)) : rez; } ^ user.cpp:24:55: note: ‘const std::array<std::array<long unsigned int, 2u>, 2u>’ is not derived from ‘mat<T, N, M>’ user.cpp:24:77: error: body of constexpr function ‘constexpr T exp(const T&, int, const T&) [with T = std::array<std::array<long unsigned int, 2u>, 2u>]’ not a return-statement return (x!=0) ? ((x&1) ? exp(e*e, x/2, rez*e) : exp(e*e, x/2, rez)) : rez; } ^ user.cpp: In function ‘constexpr T exp(const T&, int, const T&) [with T = std::array<std::array<long unsigned int, 2u>, 2u>]’: user.cpp:24:77: warning: control reaches end of non-void function [-Wreturn-type] return (x!=0) ? ((x&1) ? exp(e*e, x/2, rez*e) : exp(e*e, x/2, rez)) : rez; } ^

Ceva nu functioneaza?