bug-commoncpp
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

More compiler errors: class NetworkDeviceInfo has no operator=


From: Tobias Erbsland
Subject: More compiler errors: class NetworkDeviceInfo has no operator=
Date: Fri, 19 Dec 2003 15:17:49 +0100
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6b) Gecko/20031205 Thunderbird/0.4


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>::size_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




Attachment: pgpE1iNyAYkx0.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]