ID 5770908
Пользователь Костюков Максим Сергеевич
Время 16:22<< 14.11.2021 16:28 (25 д. 14:28) 16:29>>
Обработка 16:28 ... 16:28 (14,96 сек.)
Файл 5770908.cpp (CLang++ 5.0.0 + Address Sanitizer)
Турнир 2 курс. Программирование на C++. Турнир 2, осень 2021
Задача D: FixedAllocator
Набор тестов
Ограничения Время: 2с Память: 128Мб
Состояние  [?]
CE Ошибка компиляции
код | результаты
In file included from main.cpp:28:0:
fixed_allocator.h: In instantiation of 'Tp* FixedAllocator<Tp>::Allocate() [with Tp = int]':
main.cpp:45:30:   required from here
fixed_allocator.h:19:39: error: invalid conversion from 'void*' to 'int*' [-fpermissive]
       return page_allocator_->Allocate();
              ~~~~~~~~~~~~~~~~~~~~~~~~~^~
fixed_allocator.h: In instantiation of 'Tp* FixedAllocator<Tp>::Allocate() [with Tp = std::__cxx11::basic_string<char>]':
main.cpp:57:24:   required from here
fixed_allocator.h:19:39: error: invalid conversion from 'void*' to 'std::__cxx11::basic_string<char>*' [-fpermissive]
fixed_allocator.h: In instantiation of 'Tp* FixedAllocator<Tp>::Allocate() [with Tp = char]':
main.cpp:119:40:   required from here
fixed_allocator.h:19:39: error: invalid conversion from 'void*' to 'char*' [-fpermissive]
[печатать | |
]
(667 b)
0.094s 0.008s 10