ID 5777943
Пользователь Долматов Кирилл Дмитриевич
Время 13:22<< 15.11.2021 13:23 (26 д. 11:24) 13:26>>
Обработка 13:23 ... 13:23 (3,18 сек.)
Файл 5777943.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 'bool smart_pointer::SmartPointer<T, Allocator>::operator==(const smart_pointer::SmartPointer<U, AnotherAllocator>&) const [with U = float; AnotherAllocator = std::allocator<float>; T = float; Allocator = std::allocator<float>]':
Test_SmartPointer.hpp:299:9:   required from here
SmartPointer.hpp:135:35: error: suggest parentheses around '&&' within '||' [-Werror=parentheses]
         return p.get() == nullptr && get() == nullptr ||
SmartPointer.hpp: In instantiation of '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:305:9:   required from here
SmartPointer.hpp:135:35: error: suggest parentheses around '&&' within '||' [-Werror=parentheses]
SmartPointer.hpp: In instantiation of 'bool smart_pointer::SmartPointer<T, Allocator>::operator!=(const smart_pointer::SmartPointer<U, AnotherAllocator>&) const [with U = float; AnotherAllocator = std::allocator<float>; T = float; Allocator = std::allocator<float>]':
Test_SmartPointer.hpp:349:9:   required from here
SmartPointer.hpp:144:37: error: suggest parentheses around '&&' within '||' [-Werror=parentheses]
         return !(p.get() == nullptr && get() == nullptr ||
SmartPointer.hpp: In instantiation of '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:144:37: error: suggest parentheses around '&&' within '||' [-Werror=parentheses]
cc1plus: all warnings being treated as errors
0.056s 0.012s 9