In file included from main.cpp:28:0:
fixed_allocator.h: In member function 'Tp* FixedAllocator<Tp>::Allocate()':
fixed_allocator.h:15:34: error: '_page_size' was not declared in this scope
for (uint i = 0; i < _page_size; ++i)
^~~~~~~~~~
fixed_allocator.h: In instantiation of 'Tp* FixedAllocator<Tp>::Allocate() [with Tp = int]':
main.cpp:45:30: required from here
fixed_allocator.h:14:24: error: cannot dynamic_cast '((FixedAllocator<int>*)this)->FixedAllocator<int>::page_allocator_->PageAllocator::Allocate()' (of type 'void*') to type 'int*' (target is not pointer or reference to class)
Tp* next = dynamic_cast<Tp*>(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:14:24: error: cannot dynamic_cast '((FixedAllocator<std::__cxx11::basic_string<char> >*)this)->FixedAllocator<std::__cxx11::basic_string<char> >::page_allocator_->PageAllocator::Allocate()' (of type 'void*') to type 'class std::__cxx11::basic_string<char>*' (source is not a pointer to class)
fixed_allocator.h: In instantiation of 'Tp* FixedAllocator<Tp>::Allocate() [with Tp = char]':
main.cpp:119:40: required from here
fixed_allocator.h:14:24: error: cannot dynamic_cast '((FixedAllocator<char>*)this)->FixedAllocator<char>::page_allocator_->PageAllocator::Allocate()' (of type 'void*') to type 'char*' (target is not pointer or reference to class)
|