Something about std::list<> member functions.

Gabriel Dos Reis gdr@integrable-solutions.net
Mon Aug 11 12:28:00 GMT 2003


Jerry Quinn <jlquinn@optonline.net> writes:

[...]

| Yes.  What you've written should be sufficient, but apparently there's
| a front-end deficiency that may need:
| 
| struct less {
|     template<class T>
|      bool operator()(const T& const a, const T& const b ) const
                                ^^^^^
That is  invalid.

|      { 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.
| 
| *checks inbox*
| 
| This message is what I recall about the issue:
| 
| http://gcc.gnu.org/ml/libstdc++/2003-02/msg00302.html

indeed.  But it is talking about object type.  "const T&" is not an
object type.

Thanks for the pointer though.



More information about the Libstdc++ mailing list