ID 5787093
Пользователь Зеленский Сергей Максимович
Время 20:44<< 16.11.2021 20:45 (27 д. 18:45) 20:46>>
Обработка 20:45 ... 20:45 (2,12 сек.)
Файл 5787093.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 'FixedAllocator<Tp>::FixedAllocator(uint64_t) [with Tp = int; uint64_t = long unsigned int]':
main.cpp:44:32:   required from here
fixed_allocator.h:11:12: error: 'FixedAllocator<int>::page_size_' will be initialized after [-Werror=reorder]
   uint64_t page_size_;
            ^~~~~~~~~~
fixed_allocator.h:10:17: error:   'PageAllocator FixedAllocator<int>::page_allocator_' [-Werror=reorder]
   PageAllocator page_allocator_;
                 ^~~~~~~~~~~~~~~
fixed_allocator.h:16:14: error:   when initialized here [-Werror=reorder]
     explicit FixedAllocator(std::uint64_t page_size) :
              ^~~~~~~~~~~~~~
fixed_allocator.h: In instantiation of 'Tp* FixedAllocator<Tp>::Allocate() [with Tp = int]':
main.cpp:45:30:   required from here
fixed_allocator.h:24:26: error: request for member 'push' in 'f_memory', which is of non-class type 'int*'
                 f_memory.push(f_memory + i);
                 ~~~~~~~~~^~~~
fixed_allocator.h:28:33: error: request for member 'top' in 'f_memory', which is of non-class type 'int*'
         Tp* f_memory = f_memory.top();
                        ~~~~~~~~~^~~
fixed_allocator.h:29:18: error: request for member 'pop' in 'f_memory', which is of non-class type 'int*'
         f_memory.pop();
         ~~~~~~~~~^~~
fixed_allocator.h: In instantiation of 'FixedAllocator<Tp>::FixedAllocator(uint64_t) [with Tp = std::__cxx11::basic_string<char>; uint64_t = long unsigned int]':
main.cpp:55:41:   required from here
fixed_allocator.h:11:12: error: 'FixedAllocator<std::__cxx11::basic_string<char> >::page_size_' will be initialized after [-Werror=reorder]
   uint64_t page_size_;
            ^~~~~~~~~~
fixed_allocator.h:10:17: error:   'PageAllocator FixedAllocator<std::__cxx11::basic_string<char> >::page_allocator_' [-Werror=reorder]
   PageAllocator page_allocator_;
                 ^~~~~~~~~~~~~~~
fixed_allocator.h:16:14: error:   when initialized here [-Werror=reorder]
     explicit FixedAllocator(std::uint64_t page_size) :
              ^~~~~~~~~~~~~~
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:24:26: error: request for member 'push' in 'f_memory', which is of pointer type 'std::__cxx11::basic_string<char>*' (maybe you meant to use '->' ?)
                 f_memory.push(f_memory + i);
                 ~~~~~~~~~^~~~
fixed_allocator.h:28:33: error: request for member 'top' in 'f_memory', which is of pointer type 'std::__cxx11::basic_string<char>*' (maybe you meant to use '->' ?)
         Tp* f_memory = f_memory.top();
                        ~~~~~~~~~^~~
fixed_allocator.h:29:18: error: request for member 'pop' in 'f_memory', which is of pointer type 'std::__cxx11::basic_string<char>*' (maybe you meant to use '->' ?)
         f_memory.pop();
         ~~~~~~~~~^~~
fixed_allocator.h: In instantiation of 'FixedAllocator<Tp>::FixedAllocator(uint64_t) [with Tp = char; uint64_t = long unsigned int]':
main.cpp:116:35:   required from here
fixed_allocator.h:11:12: error: 'FixedAllocator<char>::page_size_' will be initialized after [-Werror=reorder]
   uint64_t page_size_;
            ^~~~~~~~~~
fixed_allocator.h:10:17: error:   'PageAllocator FixedAllocator<char>::page_allocator_' [-Werror=reorder]
   PageAllocator page_allocator_;
                 ^~~~~~~~~~~~~~~
fixed_allocator.h:16:14: error:   when initialized here [-Werror=reorder]
     explicit FixedAllocator(std::uint64_t page_size) :
              ^~~~~~~~~~~~~~
fixed_allocator.h: In instantiation of 'Tp* FixedAllocator<Tp>::Allocate() [with Tp = char]':
main.cpp:119:40:   required from here
fixed_allocator.h:24:26: error: request for member 'push' in 'f_memory', which is of non-class type 'char*'
                 f_memory.push(f_memory + i);
                 ~~~~~~~~~^~~~
fixed_allocator.h:28:33: error: request for member 'top' in 'f_memory', which is of non-class type 'char*'
         Tp* f_memory = f_memory.top();
                        ~~~~~~~~~^~~
fixed_allocator.h:29:18: error: request for member 'pop' in 'f_memory', which is of non-class type 'char*'
         f_memory.pop();
         ~~~~~~~~~^~~
cc1plus: all warnings being treated as errors
[печатать | |
]
(941 b)
0.082s 0.008s 10