ID 5786164
Пользователь Акуленко Валерий Васильевич
Время 19:04<< 16.11.2021 19:05 (27 д. 17:06) 19:06>>
Обработка 19:05 ... 19:05 (1.92 сек.)
Файл 5786164.cpp (CLang++ 5.0.0 + Address Sanitizer)
Турнир 2 курс. Программирование на C++. Турнир 2, осень 2021
Задача C: Smart Pointer
Набор тестов
Ограничения Время: 25с Память: 512Мб
Состояние  [?]
CE Ошибка компиляции
код | результаты
In file included from main.cpp:2:0:
SmartPointer.hpp: In instantiation of 'smart_pointer::SmartPointer<T, Allocator>::value_type* smart_pointer::SmartPointer<T, Allocator>::get() const [with T = float; Allocator = std::allocator<float>; smart_pointer::SmartPointer<T, Allocator>::value_type = float]':
Test_SmartPointer.hpp:270:9:   required from here
SmartPointer.hpp:168:13: error: statement has no effect [-Werror=unused-value]
       core->ptr_;
       ~~~~~~^~~~
SmartPointer.hpp: In instantiation of 'smart_pointer::SmartPointer<T, Allocator>::value_type* smart_pointer::SmartPointer<T, Allocator>::get() const [with T = long unsigned int; Allocator = std::allocator<long unsigned int>; smart_pointer::SmartPointer<T, Allocator>::value_type = long unsigned int]':
SmartPointer.hpp:186:23:   required from 'bool smart_pointer::SmartPointer<T, Allocator>::operator!=(const smart_pointer::SmartPointer<U, AnotherAllocator>&) const [with U = long unsigned int; AnotherAllocator = std::allocator<long unsigned int>; T = float; Allocator = std::allocator<float>]'
Test_SmartPointer.hpp:355:9:   required from here
SmartPointer.hpp:168:13: error: statement has no effect [-Werror=unused-value]
cc1plus: all warnings being treated as errors
0.030s 0.009s 9