Borderou de evaluare (job #2443590)

Utilizator gicugAndrei gicug Data 28 iulie 2019 17:31:02
Problema Sortare prin comparare Status done
Runda Arhiva educationala Compilator cpp-64 | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: main.cpp: In function 'std::pair<std::unique_ptr<unsigned int []>, int> read()': main.cpp:46:15: error: no matching function for call to 'std::unique_ptr<unsigned int []>::unique_ptr(uint32_t (*)[500000])' Array a(&arr); ^ In file included from /usr/include/c++/6/memory:81:0, from main.cpp:2: /usr/include/c++/6/bits/unique_ptr.h:498:2: note: candidate: template<class _Up, class _Ep, class> std::unique_ptr<_Tp [], _Dp>::unique_ptr(std::unique_ptr<_Up, _Ep>&&) unique_ptr(unique_ptr<_Up, _Ep>&& __u) noexcept ^~~~~~~~~~ /usr/include/c++/6/bits/unique_ptr.h:498:2: note: template argument deduction/substitution failed: main.cpp:46:15: note: mismatched types 'std::unique_ptr<_Tp, _Dp>' and 'uint32_t (*)[500000] {aka unsigned int (*)[500000]}' Array a(&arr); ^ In file included from /usr/include/c++/6/memory:81:0, from main.cpp:2: /usr/include/c++/6/bits/unique_ptr.h:494:17: note: candidate: constexpr std::unique_ptr<_Tp [], _Dp>::unique_ptr(std::nullptr_t) [with _Tp = unsigned int; _Dp = std::default_delete<unsigned int []>; std::nullptr_t = std::nullptr_t] constexpr unique_ptr(nullptr_t) noexcept : unique_ptr() { } ^~~~~~~~~~ /usr/include/c++/6/bits/unique_ptr.h:494:17: note: no known conversion for argument 1 from 'uint32_t (*)[500000] {aka unsigned int (*)[500000]}' to 'std::nullptr_t' /usr/include/c++/6/bits/unique_ptr.h:490:7: note: candidate: std::unique_ptr<_Tp [], _Dp>::unique_ptr(std::unique_ptr<_Tp [], _Dp>&&) [with _Tp = unsigned int; _Dp = std::default_delete<unsigned int []>] unique_ptr(unique_ptr&& __u) noexcept ^~~~~~~~~~ /usr/include/c++/6/bits/unique_ptr.h:490:7: note: no known conversion for argument 1 from 'uint32_t (*)[500000] {aka unsigned int (*)[500000]}' to 'std::unique_ptr<unsigned int []>&&' /usr/include/c++/6/bits/unique_ptr.h:483:7: note: candidate: template<class _Up, class> std::unique_ptr<_Tp [], _Dp>::unique_ptr(_Up, typename std::remove_reference<_To>::type&&) unique_ptr(_Up __p, typename ^~~~~~~~~~ /usr/include/c++/6/bits/unique_ptr.h:483:7: note: template argument deduction/substitution failed: main.cpp:46:15: note: candidate expects 2 arguments, 1 provided Array a(&arr); ^ In file included from /usr/include/c++/6/memory:81:0, from main.cpp:2: /usr/include/c++/6/bits/unique_ptr.h:467:7: note: candidate: template<class _Up, class> std::unique_ptr<_Tp [], _Dp>::unique_ptr(_Up, typename std::conditional<std::is_reference<_Dp>::value, _Dp, const _Dp&>::type) unique_ptr(_Up __p, ^~~~~~~~~~ /usr/include/c++/6/bits/unique_ptr.h:467:7: note: template argument deduction/substitution failed: main.cpp:46:15: note: candidate expects 2 arguments, 1 provided Array a(&arr); ^ In file included from /usr/include/c++/6/memory:81:0, from main.cpp:2: /usr/include/c++/6/bits/unique_ptr.h:451:7: note: candidate: template<class _Up, class> std::unique_ptr<_Tp [], _Dp>::unique_ptr(_Up) unique_ptr(_Up __p) noexcept ^~~~~~~~~~ /usr/include/c++/6/bits/unique_ptr.h:451:7: note: template argument deduction/substitution failed: /usr/include/c++/6/bits/unique_ptr.h:448:16: error: no type named 'type' in 'struct std::enable_if<false, bool>' typename = typename enable_if< ^~~~~~~~ /usr/include/c++/6/bits/unique_ptr.h:435:17: note: candidate: constexpr std::unique_ptr<_Tp [], _Dp>::unique_ptr() [with _Tp = unsigned int; _Dp = std::default_delete<unsigned int []>] constexpr unique_ptr() noexcept Non zero exit status: 1

Ceva nu functioneaza?