ID 5793410
Пользователь Бурачинский Александр Дмитриевич
Время 17:20<< 18.11.2021 17:20 (19:37) 17:21>>
Обработка 17:20 ... 17:20 (3,78 сек.)
Файл 5793410.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:30:23: error: type 'smart_pointer::exception' is not a base type for type 'smart_pointer::exception'
     using base_class::base_class;
                       ^~~~~~~~~~
SmartPointer.hpp: In instantiation of 'smart_pointer::SmartPointer<T, Allocator>::Core::Core(smart_pointer::SmartPointer<T, Allocator>::value_type*) [with T = float; Allocator = std::allocator<float>; smart_pointer::SmartPointer<T, Allocator>::value_type = float]':
SmartPointer.hpp:41:40:   required from 'smart_pointer::SmartPointer<T, Allocator>::SmartPointer(smart_pointer::SmartPointer<T, Allocator>::value_type*) [with T = float; Allocator = std::allocator<float>; smart_pointer::SmartPointer<T, Allocator>::value_type = float]'
Test_SmartPointer.hpp:103:30:   required from here
SmartPointer.hpp:157:21: error: 'smart_pointer::SmartPointer<float, std::allocator<float> >::Core::p' will be initialized after [-Werror=reorder]
         value_type* p;
                     ^
SmartPointer.hpp:156:20: error:   'std::size_t smart_pointer::SmartPointer<float, std::allocator<float> >::Core::c' [-Werror=reorder]
         size_t c = 0;
                    ^
SmartPointer.hpp:150:18: error:   when initialized here [-Werror=reorder]
         explicit Core(value_type* x) : p(x), c(1) {}
                  ^~~~
SmartPointer.hpp: In instantiation of 'smart_pointer::SmartPointer<T, Allocator>::Core::Core(smart_pointer::SmartPointer<T, Allocator>::value_type*) [with T = long unsigned int; Allocator = std::allocator<long unsigned int>; smart_pointer::SmartPointer<T, Allocator>::value_type = long unsigned int]':
SmartPointer.hpp:41:40:   required from 'smart_pointer::SmartPointer<T, Allocator>::SmartPointer(smart_pointer::SmartPointer<T, Allocator>::value_type*) [with T = long unsigned int; Allocator = std::allocator<long unsigned int>; smart_pointer::SmartPointer<T, Allocator>::value_type = long unsigned int]'
Test_SmartPointer.hpp:304:38:   required from here
SmartPointer.hpp:157:21: error: 'smart_pointer::SmartPointer<long unsigned int, std::allocator<long unsigned int> >::Core::p' will be initialized after [-Werror=reorder]
         value_type* p;
                     ^
SmartPointer.hpp:156:20: error:   'std::size_t smart_pointer::SmartPointer<long unsigned int, std::allocator<long unsigned int> >::Core::c' [-Werror=reorder]
         size_t c = 0;
                    ^
SmartPointer.hpp:150:18: error:   when initialized here [-Werror=reorder]
         explicit Core(value_type* x) : p(x), c(1) {}
                  ^~~~
cc1plus: all warnings being treated as errors
0.049s 0.008s 9