[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: More compiler errors: class NetworkDeviceInfo has no operator=
From: |
David Sugar |
Subject: |
Re: More compiler errors: class NetworkDeviceInfo has no operator= |
Date: |
Sat, 20 Dec 2003 06:27:37 -0500 |
User-agent: |
KMail/1.5.3 |
This one I have not determined which approach would be better to do yet. But
if you would like to submit a quick patch, I will look at that...
On Friday 19 December 2003 09:17 am, Tobias Erbsland wrote:
> Hello
>
> A compiler error by MS Visual C++ .NET (7.0):
>
> network.cpp
> c:\Programme\Microsoft Visual Studio .NET
> 2003\Vc7\include\xutility(1136) : error C2679: binary '=' : no operator
> found which takes a right-hand operand of type 'const
> ost::NetworkDeviceInfo' (or there is no acceptable conversion)
> c:\Programme\Microsoft Visual Studio .NET
> 2003\Vc7\include\vector(862) : see reference to function template
> instantiation 'void
> std::fill<std::vector<_Ty>::_Tptr,_Ty>(_FwdIt,_FwdIt,const _Ty &)' being
> compiled
> with
> [
> _Ty=ost::NetworkDeviceInfo,
> _FwdIt=std::vector<ost::NetworkDeviceInfo>::_Tptr
> ]
> c:\Programme\Microsoft Visual Studio .NET
> 2003\Vc7\include\vector(809) : while compiling class-template member
> function 'void
> std::vector<_Ty>::_Insert_n(std::vector<_Ty>::iterator,std::vector<_Ty>::si
>ze_type,const _Ty &)'
> with
> [
> _Ty=ost::NetworkDeviceInfo
> ]
> d:\commoncpp2\src\network.cpp(84) : see reference to class
> template instantiation 'std::vector<_Ty>' being compiled
> with
> [
> _Ty=ost::NetworkDeviceInfo
> ]
>
> because the class NetworkDeviceInfo has a copy constructor, but no
> overloaded assign operator.
>
> Solution: overload the assign operator, or remove all assignments to the
> std::vector<NetworkDeviceInfo> ...
>
> regards
> Tobias