ID 5793463
Пользователь Бурачинский Александр Дмитриевич
Время 17:38<< 18.11.2021 17:39 (19:56) 19:52>>
Обработка 17:39 ... 17:39 (2,63 сек.)
Файл 5793463.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:159:15: error: 'smart_pointer::SmartPointer<float, std::allocator<float> >::Core::p' will be initialized after [-Werror=reorder]
   value_type* p;
               ^
SmartPointer.hpp:158:10: 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:159:15: 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:158:10: 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 754 b)
0.197s 0.010s 10