ID 5793448
Пользователь Бурачинский Александр Дмитриевич
Время 17:25<< 18.11.2021 17:31 (19:48) 17:38>>
Обработка 17:31 ... 17:32 (4,16 сек.)
Файл 5793448.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>::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:43: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:161:21: error: 'smart_pointer::SmartPointer<float, std::allocator<float> >::Core::p' will be initialized after [-Werror=reorder]
         value_type* p;
                     ^
SmartPointer.hpp:160:16: error:   'std::size_t smart_pointer::SmartPointer<float, std::allocator<float> >::Core::c' [-Werror=reorder]
         size_t c;
                ^
SmartPointer.hpp:152:18: error:   when initialized here [-Werror=reorder]
         explicit Core(value_type* x) :
                  ^~~~
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:43: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:161: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:160:16: error:   'std::size_t smart_pointer::SmartPointer<long unsigned int, std::allocator<long unsigned int> >::Core::c' [-Werror=reorder]
         size_t c;
                ^
SmartPointer.hpp:152:18: error:   when initialized here [-Werror=reorder]
         explicit Core(value_type* x) :
                  ^~~~
cc1plus: all warnings being treated as errors
[печатать | |
]
(3 840 b)
0.120s 0.011s 10