Article View: borland.public.cppbuilder.upgrade
Article #55BCB6 to BDS2006 problems with operators
From: Roland
Date: Wed, 10 Oct 2007 07:48
Date: Wed, 10 Oct 2007 07:48
36 lines
1758 bytes
1758 bytes
In BCB6 I could overload the = operator like:
TMyClass& __fastcall operator=(TMyClass &p);
TMyClass& __fastcall TMyClass::operator=(TMyClass &p)
{
for(int i = 0; i < 4; i++) {
FEnabled[i] = p.Enabled[i];
FPosition[i] = p.Position[i];
}
FMode = p.Mode;
FDivider = p.Divider;
return this;
}
Now in BDS2006 I get an error msg like:
[C++ Error] xutility(1645): E2285 No match found for
'TMyClass::operator =(const TMyClass)'
the IDE points then to the file xutility line 1479
// TEMPLATE FUNCTION copy
template<class _InIt,
class _OutIt> inline
_OutIt _Copy_opt(_InIt _First, _InIt _Last, _OutIt _Dest,
_Nonscalar_ptr_iterator_tag)
{ // copy [_First, _Last) to [_Dest, ...), arbitrary iterators
_DEBUG_RANGE(_First, _Last);
for (; _First != _Last; ++_Dest, ++_First)
//1479---> *_Dest = *_First;
return (_Dest);
Is there anything canged?
Roland
Technical Details
Message-ID:
<470c83d5$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!proxad.net!feeder1-2.proxad.net!213.200.89.82.MISMATCH!tiscali!newsfeed1.ip.tiscali.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Thread: 10529a,d8a389c9012d5c15,start X-Google-Attributes: gid10529a,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit From: "Roland" <neubert_nosp_@_nosp_wst.eu> Sender: "Roland" <neubert_nosp_@_nosp_wst.eu> Reply-To: "Roland" <neubert_nosp_@_nosp_wst.eu> Subject: BCB6 to BDS2006 problems with operators Newsgroups: borland.public.cppbuilder.upgrade X-User-Info: 84.135.21.253 NNTP-Posting-Host: 207.105.83.66 Message-ID: <470c83d5$1@newsgroups.borland.com> Date: 10 Oct 2007 00:48:37 -0700 X-Trace: newsgroups.borland.com 1192002517 207.105.83.66 (10 Oct 2007 00:48:37 -0700) Lines: 38 Path: arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!proxad.net!feeder1-2.proxad.net!213.200.89.82.MISMATCH!tiscali!newsfeed1.ip.tiscali.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail