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:38:12: error: 'FixedAllocator<int>::page_size_' will be initialized after [-Werror=reorder]
uint64_t page_size_;
^~~~~~~~~~
fixed_allocator.h:37:17: error: 'PageAllocator FixedAllocator<int>::page_allocator_' [-Werror=reorder]
PageAllocator page_allocator_;
^~~~~~~~~~~~~~~
fixed_allocator.h:10: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:18:30: error: request for member 'push' in 'free_memory_', which is of non-class type 'int*'
free_memory_.push(free_memory_ + i);
~~~~~~~~~~~~~^~~~
fixed_allocator.h:25:16: error: cannot convert 'std::stack<int*, std::deque<int*, std::allocator<int*> > >' to 'int*' in return
return free_memory_;
^~~~~~~~~~~~
fixed_allocator.h:22:13: error: unused variable 'free_memory' [-Werror=unused-variable]
Tp* free_memory = free_memory_.top();
^~~~~~~~~~~
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:38:12: error: 'FixedAllocator<std::__cxx11::basic_string<char> >::page_size_' will be initialized after [-Werror=reorder]
uint64_t page_size_;
^~~~~~~~~~
fixed_allocator.h:37:17: error: 'PageAllocator FixedAllocator<std::__cxx11::basic_string<char> >::page_allocator_' [-Werror=reorder]
PageAllocator page_allocator_;
^~~~~~~~~~~~~~~
fixed_allocator.h:10: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:18:30: error: request for member 'push' in 'free_memory_', which is of pointer type 'std::__cxx11::basic_string<char>*' (maybe you meant to use '->' ?)
free_memory_.push(free_memory_ + i);
~~~~~~~~~~~~~^~~~
fixed_allocator.h:25:16: error: cannot convert 'std::stack<std::__cxx11::basic_string<char>*, std::deque<std::__cxx11::basic_string<char>*, std::allocator<std::__cxx11::basic_string<char>*> > >' to 'std::__cxx11::basic_string<char>*' in return
return free_memory_;
^~~~~~~~~~~~
fixed_allocator.h:22:13: error: unused variable 'free_memory' [-Werror=unused-variable]
Tp* free_memory = free_memory_.top();
^~~~~~~~~~~
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:38:12: error: 'FixedAllocator<char>::page_size_' will be initialized after [-Werror=reorder]
uint64_t page_size_;
^~~~~~~~~~
fixed_allocator.h:37:17: error: 'PageAllocator FixedAllocator<char>::page_allocator_' [-Werror=reorder]
PageAllocator page_allocator_;
^~~~~~~~~~~~~~~
fixed_allocator.h:10: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:18:30: error: request for member 'push' in 'free_memory_', which is of non-class type 'char*'
free_memory_.push(free_memory_ + i);
~~~~~~~~~~~~~^~~~
fixed_allocator.h:25:16: error: cannot convert 'std::stack<char*, std::deque<char*, std::allocator<char*> > >' to 'char*' in return
return free_memory_;
^~~~~~~~~~~~
fixed_allocator.h:22:13: error: unused variable 'free_memory' [-Werror=unused-variable]
Tp* free_memory = free_memory_.top();
^~~~~~~~~~~
cc1plus: all warnings being treated as errors
|