I know this question have been already asked and answered, but even with that, I cannot figure it out
In file included from /usr/include/c++/9.2.0/x86_64-pc-linux-gnu/bits/c++allocator.h:33,
from /usr/include/c++/9.2.0/bits/allocator.h:46,
from /usr/include/c++/9.2.0/list:61,
from src/composants/List/List.hpp:14,
from src/composants/List/List.cpp:8:
/usr/include/c++/9.2.0/ext/new_allocator.h: In instantiation of ‘void __gnu_cxx::new_allocator<_Tp>::construct(_Up*, _Args&& ...) [with _Up = Entity_c; _Args = {const Entity_c&}; _Tp = std::_List_node<Entity_c>]’:
/usr/include/c++/9.2.0/bits/alloc_traits.h:482:2: required from ‘static void std::allocator_traits<std::allocator<_Tp1> >::construct(std::allocator_traits<std::allocator<_Tp1> >::allocator_type&, _Up*, _Args&& ...) [with _Up = Entity_c; _Args = {const Entity_c&}; _Tp = std::_List_node<Entity_c>; std::allocator_traits<std::allocator<_Tp1> >::allocator_type = std::allocator<std::_List_node<Entity_c> >]’
/usr/include/c++/9.2.0/bits/stl_list.h:633:33: required from ‘std::__cxx11::list<_Tp, _Alloc>::_Node* std::__cxx11::list<_Tp, _Alloc>::_M_create_node(_Args&& ...) [with _Args = {const Entity_c&}; _Tp = Entity_c; _Alloc = std::allocator<Entity_c>; std::__cxx11::list<_Tp, _Alloc>::_Node = std::_List_node<Entity_c>]’
/usr/include/c++/9.2.0/bits/stl_list.h:1907:10: required from ‘void std::__cxx11::list<_Tp, _Alloc>::_M_insert(std::__cxx11::list<_Tp, _Alloc>::iterator, _Args&& ...) [with _Args = {const Entity_c&}; _Tp = Entity_c; _Alloc = std::allocator<Entity_c>; std::__cxx11::list<_Tp, _Alloc>::iterator = std::_List_iterator<Entity_c>]’
/usr/include/c++/9.2.0/bits/stl_list.h:1208:9: required from ‘void std::__cxx11::list<_Tp, _Alloc>::push_back(const value_type&) [with _Tp = Entity_c; _Alloc = std::allocator<Entity_c>; std::__cxx11::list<_Tp, _Alloc>::value_type = Entity_c]’
src/composants/List/List.cpp:57:29: required from here
/usr/include/c++/9.2.0/ext/new_allocator.h:145:20: error: use of deleted function ‘Entity_c::Entity_c(const Entity_c&)’
145 | noexcept(noexcept(::new((void *)__p)
| ^~~~~~~~~~~~~~~~~~
146 | _Up(std::forward<_Args>(__args)...)))
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/composants/List/List.cpp:9:
src/composants/Entity/Entity.hpp:16:7: note: ‘Entity_c::Entity_c(const Entity_c&)’ is implicitly deleted because the default definition would be ill-formed:
16 | class Entity_c {
| ^~~~~~~~
src/composants/Entity/Entity.hpp:16:7: error: use of deleted function ‘sf::Mutex::Mutex(const sf::Mutex&)’
In file included from src/composants/List/List.hpp:12,
from src/composants/List/List.cpp:8:
/usr/include/SFML/System/Mutex.hpp:47:23: note: ‘sf::Mutex::Mutex(const sf::Mutex&)’ is implicitly deleted because the default definition would be ill-formed:
47 | class SFML_SYSTEM_API Mutex : NonCopyable
| ^~~~~
/usr/include/SFML/System/Mutex.hpp:47:23: error: ‘sf::NonCopyable::NonCopyable(const sf::NonCopyable&)’ is private within this context
In file included from /usr/include/SFML/System/Thread.hpp:32,
from src/composants/List/List.hpp:11,
from src/composants/List/List.cpp:8:
/usr/include/SFML/System/NonCopyable.hpp:77:5: note: declared private here
77 | NonCopyable(const NonCopyable&);
| ^~~~~~~~~~~
In file included from src/composants/List/List.cpp:9:
src/composants/Entity/Entity.hpp:16:7: error: use of deleted function ‘sf::Mutex::Mutex(const sf::Mutex&)’
16 | class Entity_c {
I do not understand thoses errors, but I've still figured out which part of my code is throwing it :
54 void List_c::operator++(int)
55 {
56 Entity_c *entity = new Entity_c;
57 m_list.push_back(*entity);
58 }
I have to say that I don't really understand why this is throwing something like (as I understood) I'm trying to call Entity_c::Entity_c(const Entity_c&)
.
Entity_c is defined as follow :
16 class Entity_c {
17 public:
18 Entity_c();
19 ~Entity_c();
...
81 };
Well, it is possible that I just didn't understand that error at all, so please, feel free to show me my mistakes.