In file included from /usr/include/c++/12.2.0/string:50,
from /usr/include/c++/12.2.0/bits/locale_classes.h:40,
from /usr/include/c++/12.2.0/bits/ios_base.h:41,
from /usr/include/c++/12.2.0/ios:42,
from /usr/include/c++/12.2.0/ostream:38,
from /usr/include/c++/12.2.0/iostream:39,
from main.cpp:2:
/usr/include/c++/12.2.0/bits/stl_algobase.h: In instantiation of ‘static constexpr _OI std::__copy_move<false, false, std::random_access_iterator_tag>::__copy_m(_II, _II, _OI) [with _II = const MailList::Person*; _OI = MailList::Person*]’:
/usr/include/c++/12.2.0/bits/stl_algobase.h:492:12: required from ‘constexpr _OI std::__copy_move_a2(_II, _II, _OI) [with bool _IsMove = false; _II = const MailList::Person*; _OI = MailList::Person*]’
/usr/include/c++/12.2.0/bits/stl_algobase.h:522:42: required from ‘constexpr _OI std::__copy_move_a1(_II, _II, _OI) [with bool _IsMove = false; _II = const MailList::Person*; _OI = MailList::Person*]’
/usr/include/c++/12.2.0/bits/stl_algobase.h:530:31: required from ‘constexpr _OI std::__copy_move_a(_II, _II, _OI) [with bool _IsMove = false; _II = __gnu_cxx::__normal_iterator<const MailList::Person*, vector<MailList::Person> >; _OI = __gnu_cxx::__normal_iterator<MailList::Person*, vector<MailList::Person> >]’
/usr/include/c++/12.2.0/bits/stl_algobase.h:620:7: required from ‘constexpr _OI std::copy(_II, _II, _OI) [with _II = __gnu_cxx::__normal_iterator<const MailList::Person*, vector<MailList::Person> >; _OI = __gnu_cxx::__normal_iterator<MailList::Person*, vector<MailList::Person> >]’
/usr/include/c++/12.2.0/bits/vector.tcc:244:31: required from ‘constexpr std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(const std::vector<_Tp, _Alloc>&) [with _Tp = MailList::Person; _Alloc = std::allocator<MailList::Person>]’
main.cpp:106:17: required from here
/usr/include/c++/12.2.0/bits/stl_algobase.h:385:25: error: binding reference of type ‘MailList::Person&’ to ‘const MailList::Person’ discards qualifiers
385 | *__result = *__first;
| ~~~~~~~~~~^~~~~~~~~~
main.cpp:26:32: note: initializing argument 1 of ‘void MailList::Person::operator=(MailList::Person&)’
26 | void operator=(Person &p) {
| ~~~~~~~~^
|