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.


Dhruv Matani <dhruvbird@gmx.net> writes:

[...]

| > 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, it is not.  It is invalid construct.

-- Gaby


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