Borderou de evaluare (job #2081053)

Utilizator mlc_oficialBoris Barca mlc_oficial Data 3 decembrie 2017 21:01:24
Problema Hashuri Status done
Runda Arhiva educationala Compilator cpp | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: user.cpp: In instantiation of ‘constexpr const size_t MemoryPool<std::_Rb_tree_node<int>, 1024u>::Buffer::size’: user.cpp:27:27: required from ‘class MemoryPool<std::_Rb_tree_node<int>, 1024u>::Buffer’ user.cpp:45:23: required from ‘MemoryPool<T, grow_size>::~MemoryPool() [with T = std::_Rb_tree_node<int>; unsigned int grow_size = 1024u]’ user.cpp:98:5: required from ‘Allocator<T, grow_size>::~Allocator() [with T = std::_Rb_tree_node<int>; unsigned int grow_size = 1024u]’ /usr/include/c++/4.8/bits/stl_tree.h:439:16: required from ‘std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::~_Rb_tree() [with _Key = int; _Val = int; _KeyOfValue = std::_Identity<int>; _Compare = std::less<int>; _Alloc = Allocator<int>]’ /usr/include/c++/4.8/bits/stl_set.h:90:11: required from here user.cpp:26:67: error: call to non-constexpr function ‘const _Tp& std::max(const _Tp&, const _Tp&) [with _Tp = unsigned int]’ static constexpr size_t size = max(sizeof(T), sizeof(List)); ^ user.cpp: In instantiation of ‘T* MemoryPool<T, grow_size>::Buffer::GetBlock(size_t) [with T = std::_Rb_tree_node<int>; unsigned int grow_size = 1024u; size_t = unsigned int]’: user.cpp:62:45: required from ‘T* MemoryPool<T, grow_size>::Allocate() [with T = std::_Rb_tree_node<int>; unsigned int grow_size = 1024u]’ user.cpp:108:51: required from ‘T* Allocator<T, grow_size>::allocate(size_t, std::allocator<void>::const_pointer) [with T = std::_Rb_tree_node<int>; unsigned int grow_size = 1024u; size_t = unsigned int; std::allocator<void>::const_pointer = const void*]’ /usr/include/c++/4.8/bits/stl_tree.h:370:51: required from ‘std::_Rb_tree_node<_Val>* std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_M_get_node() [with _Key = int; _Val = int; _KeyOfValue = std::_Identity<int>; _Compare = std::less<int>; _Alloc = Allocator<int>; std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_Link_type = std::_Rb_tree_node<int>*]’ /usr/include/c++/4.8/bits/stl_tree.h:403:35: required from ‘std::_Rb_tree_node<_Val>* std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_M_create_node(_Args&& ...) [with _Args = {const int&}; _Key = int; _Val = int; _KeyOfValue = std::_Identity<int>; _Compare = std::less<int>; _Alloc = Allocator<int>; std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_Link_type = std::_Rb_tree_node<int>*]’ /usr/include/c++/4.8/bits/stl_tree.h:1020:66: required from ‘std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_M_insert_(std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_Base_ptr, std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_Base_ptr, _Arg&&) [with _Arg = const int&; _Key = int; _Val = int; _KeyOfValue = std::_Identity<int>; _Compare = std::less<int>; _Alloc = Allocator<int>; std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator = std::_Rb_tree_iterator<int>; std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_Base_ptr = std::_Rb_tree_node_base*]’ /usr/include/c++/4.8/bits/stl_tree.h:1378:38: required from ‘std::pair<std::_Rb_tree_iterator<_Val>, bool> std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_M_insert_unique(_Arg&&) [with _Arg = const int&; _Key = int; _Val = int; _KeyOfValue = std::_Identity<int>; _Compare = std::less<int>; _Alloc = Allocator<int>]’ /usr/include/c++/4.8/bits/stl_set.h:463:29: required from ‘std::pair<typename std::_Rb_tree<_Key, _Key, std::_Identity<_Key>, _Compare, typename _Alloc::rebind<_Key>::other>::const_iterator, bool> std::set<_Key, _Compare, _Alloc>::insert(const value_type&) [with _Key = int; _Compare = std::less<int>; _Alloc = Allocator<int>; typename std::_Rb_tree<_Key, _Key, std::_Identity<_Key>, _Compare, typename _Alloc::rebind<_Key>::other>::const_iterator = std::_Rb_tree_const_iterator<int>; std::set<_Key, _Compare, _Alloc>::value_type = int]’ user.cpp:139:27: required from here user.cpp:21:46: error: using invalid field ‘MemoryPool<T, grow_size>::Buffer::buff’ return reinterpret_cast<T*>(&buff[size * idx]); ^ user.cpp: In member function ‘T* MemoryPool<T, grow_size>::Buffer::GetBlock(size_t) [with T = std::_Rb_tree_node<int>; unsigned int grow_size = 1024u; size_t = unsigned int]’: user.cpp:22:9: warning: control reaches end of non-void function [-Wreturn-type] }; ^

Ceva nu functioneaza?