This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: Something about std::list<> member functions.
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.