04. november 2003 - 22:08
#9
jeg har prøvet at lave en private copy constructor erklæring i min .h fil hvilket kompiler uden fejl. Hvis jeg tilføjer en erklæring i .cpp filen får jeg følgende:
In file included from dsr/ACKMonitor.cc:154:
/usr/include/g++-3/stl_pair.h: In method `pair<_T1, _T2>::pair (const
_T1 &, const _T2 &) [with _T1 = const int, _T2 = ACKData]':
/usr/include/g++-3/stl_map.h:164: instantiated from here
dsr/ACKMonitor.cc:25: `ACKData::ACKData (const ACKData &)' is private
/usr/include/g++-3/stl_pair.h:44: within this context
/usr/include/g++-3/stl_construct.h: In method `pair<const int,
ACKData>::pair (const pair<const int, ACKData> &)':
/usr/include/g++-3/stl_construct.h:48: instantiated from `construct (_T1 *, const _T2 &) [with _T1 = pair<const int, ACKData>, _T2 = pair<const int, ACKData>]'
/usr/include/g++-3/stl_tree.h:556: instantiated from `_Rb_tree<_Key, _Value, _KeyOfValue, _Compare, _Alloc>::_M_insert (_Rb_tree_node_base *, _Rb_tree_node_base *, const _Value &) [with _Key = int, _Value = pair<const int, ACKData>, _KeyOfValue = _Select1st<pair<const int, ACKData> >, _Compare = less<nsaddr_t>, _Alloc = allocator<ACKData>]'
/usr/include/g++-3/stl_tree.h:908: instantiated from `_Rb_tree<_Key, _Value, _KeyOfValue, _Compare, _Alloc>::insert_unique
(_Rb_tree_iterator<_Value, _Value &, _Value *>, const _Val &) [with _Key = int, _Value = pair<const int, ACKData>, _KeyOfValue = _Select1st<pair<const int, ACKData> >, _Compare = less<nsaddr_t>, _Alloc = allocator<ACKData>]'
/usr/include/g++-3/stl_map.h:164: instantiated from `map<_Key, _Tp, _Compare, _Alloc>::insert (typename _Rb_tree<_Key, pair<const _Key, _Tp>, _Select1st<pair<const _Key, _Tp> >, _Compare, _Alloc>::iterator, const pair<const _Key, _Tp> &) [with _Key = int, _Tp = ACKData, _Compare = less<nsaddr_t>, _Alloc = allocator<ACKData>]'
dsr/ACKMonitor.cc:154: instantiated from here
dsr/ACKMonitor.cc:25: `ACKData::ACKData (const ACKData &)' is private
/usr/include/g++-3/stl_construct.h:48: within this contextIn file included from dsr/ACKMonitor.cc:154:
/usr/include/g++-3/stl_pair.h: In method `pair<_T1, _T2>::pair (const
_T1 &, const _T2 &) [with _T1 = const int, _T2 = ACKData]':
/usr/include/g++-3/stl_map.h:164: instantiated from here
dsr/ACKMonitor.cc:25: `ACKData::ACKData (const ACKData &)' is private
/usr/include/g++-3/stl_pair.h:44: within this context
/usr/include/g++-3/stl_construct.h: In method `pair<const int,
ACKData>::pair (const pair<const int, ACKData> &)':
/usr/include/g++-3/stl_construct.h:48: instantiated from `construct (_T1 *, const _T2 &) [with _T1 = pair<const int, ACKData>, _T2 = pair<const int, ACKData>]'
/usr/include/g++-3/stl_tree.h:556: instantiated from `_Rb_tree<_Key, _Value, _KeyOfValue, _Compare, _Alloc>::_M_insert (_Rb_tree_node_base *, _Rb_tree_node_base *, const _Value &) [with _Key = int, _Value = pair<const int, ACKData>, _KeyOfValue = _Select1st<pair<const int, ACKData> >, _Compare = less<nsaddr_t>, _Alloc = allocator<ACKData>]'
/usr/include/g++-3/stl_tree.h:908: instantiated from `_Rb_tree<_Key, _Value, _KeyOfValue, _Compare, _Alloc>::insert_unique
(_Rb_tree_iterator<_Value, _Value &, _Value *>, const _Val &) [with _Key = int, _Value = pair<const int, ACKData>, _KeyOfValue = _Select1st<pair<const int, ACKData> >, _Compare = less<nsaddr_t>, _Alloc = allocator<ACKData>]'
/usr/include/g++-3/stl_map.h:164: instantiated from `map<_Key, _Tp, _Compare, _Alloc>::insert (typename _Rb_tree<_Key, pair<const _Key, _Tp>, _Select1st<pair<const _Key, _Tp> >, _Compare, _Alloc>::iterator, const pair<const _Key, _Tp> &) [with _Key = int, _Tp = ACKData, _Compare = less<nsaddr_t>, _Alloc = allocator<ACKData>]'
dsr/ACKMonitor.cc:154: instantiated from here
dsr/ACKMonitor.cc:25: `ACKData::ACKData (const ACKData &)' is private
/usr/include/g++-3/stl_construct.h:48: within this contextIn file included from dsr/ACKMonitor.cc:154:
/usr/include/g++-3/stl_pair.h: In method `pair<_T1, _T2>::pair (const
_T1 &, const _T2 &) [with _T1 = const int, _T2 = ACKData]':
/usr/include/g++-3/stl_map.h:164: instantiated from here
dsr/ACKMonitor.cc:25: `ACKData::ACKData (const ACKData &)' is private
/usr/include/g++-3/stl_pair.h:44: within this context
/usr/include/g++-3/stl_construct.h: In method `pair<const int,
ACKData>::pair (const pair<const int, ACKData> &)':
/usr/include/g++-3/stl_construct.h:48: instantiated from `construct (_T1 *, const _T2 &) [with _T1 = pair<const int, ACKData>, _T2 = pair<const int, ACKData>]'
/usr/include/g++-3/stl_tree.h:556: instantiated from `_Rb_tree<_Key, _Value, _KeyOfValue, _Compare, _Alloc>::_M_insert (_Rb_tree_node_base *, _Rb_tree_node_base *, const _Value &) [with _Key = int, _Value = pair<const int, ACKData>, _KeyOfValue = _Select1st<pair<const int, ACKData> >, _Compare = less<nsaddr_t>, _Alloc = allocator<ACKData>]'
/usr/include/g++-3/stl_tree.h:908: instantiated from `_Rb_tree<_Key, _Value, _KeyOfValue, _Compare, _Alloc>::insert_unique
(_Rb_tree_iterator<_Value, _Value &, _Value *>, const _Val &) [with _Key = int, _Value = pair<const int, ACKData>, _KeyOfValue = _Select1st<pair<const int, ACKData> >, _Compare = less<nsaddr_t>, _Alloc = allocator<ACKData>]'
/usr/include/g++-3/stl_map.h:164: instantiated from `map<_Key, _Tp, _Compare, _Alloc>::insert (typename _Rb_tree<_Key, pair<const _Key, _Tp>, _Select1st<pair<const _Key, _Tp> >, _Compare, _Alloc>::iterator, const pair<const _Key, _Tp> &) [with _Key = int, _Tp = ACKData, _Compare = less<nsaddr_t>, _Alloc = allocator<ACKData>]'
dsr/ACKMonitor.cc:154: instantiated from here
dsr/ACKMonitor.cc:25: `ACKData::ACKData (const ACKData &)' is private
/usr/include/g++-3/stl_construct.h:48: within this context
Er det det du mener med jeg kan se jeg mangler den?