From 7480151397576847882
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f78e5,32e2f938abbc108f
X-Google-Attributes: gidf78e5,public
From: agriffiths@ma.ccngroup.com (Alan Griffiths)
Subject: Re: const problem using a template
Date: 1998/03/18
Message-ID: <854417198wnr@ma.ccngroup.com>#1/1
X-Deja-AN: 335970184
Distribution: world
References: <6em7bt$221@fridge.shore.net>
To: undisclosed-recipients.;@ma.ccngroup.com;
X-Mail2News-User: agriffiths@ma.ccngroup.com
X-UID: 0000000001
X-Status: $$$T
X-Complaints-To: abuse@demon.net
X-Broken-Date: Wednesday, Mar 18, 1998 13.02.07 GMT
X-Mail2News-Path: devmaccn.demon.co.uk
X-Trace: mail2news.demon.co.uk 890229798 21572 agriffiths ma.ccngroup.com
Organization: Experian
Reply-To: agriffiths@ma.ccngroup.com
Newsgroups: comp.std.c++
Originator: clamage@taumet


In article: <6em7bt$221@fridge.shore.net>  "Peter Mancini" <peter_mancini@onesource.com> writes:
> 
 . . .
> C:\Program Files\DevStudio\VC\INCLUDE\xutility(45 + 47) : error C2678:
> binary '<' : no operator defined which takes a left-hand operand of type
> 'const class CNewsItem' (or there is no acceptable conversion)
 . . .
> CNewsItem is loaded into a Vector in CNewsStore. I have an operator<()
> defined. 

But do you have bool CNewsItem::operator<()(const CNewsItem&) const 
defined?  (Note the final const.)
__
Alan Griffiths              | Senior Systems Consultant, Experian (Formerly CCN)
alan.griffiths@experian.com (agriffiths@ma.ccngroup.com, Tel. +44 115 934 4517)
(ACCU C++ SIG organiser     | <http://www.accu.org/> alan@octopull.demon.co.uk)



[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html              ]




