This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Something about std::list<> member functions.


On Mon, Aug 11, 2003 at 06:55:22PM +0530, Dhruv Matani wrote:

> > struct less {
> >     template<class T>
> >      bool operator()(const T& const a, const T& const b ) const
> >      { return a < b; }
> > };
> > 
> > Note the extra const's on a and b.  I don't remember the gory details
> > on why this was needed, though.
> > 
> Is this standards compliant?

No.
http://www.parashift.com/c++-faq-lite/const-correctness.html#faq-18.7

jon

--
"The tools we use have a profound (and devious!) influence on our
 thinking habits, and, therefore, on our thinking abilities."
	- Edsger Dijkstra


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]