Farid Zaripov wrote:
If #defined _RWSTD_NO_PART_SPEC_OVERLOAD the functions
std::swap (std::container&, std::container&) is not defined (where
container is vector, list, string, deque, ...).
They may be defined the same way, as in the MSVC 7.0 STL:
class container
{
public:
friend void swap (container& __lhs, container& __rhs)
{
__lhs.swap (__rhs);
}
};
I have been added this functions with additional test
(etc/config/src/INLINE_FRIENDS.cpp).
Cool! Do you know of a compiler that doesn't allow friend functions
to be defined inside the class like this? If not, do we even need
this test?
If we do, I would suggest renaming it to INLINE_FRIEND (without
the 'S' at the end -- it's an unwritten and, unfortunately, not
always followed convention to keep the names as brief as possible
without compromising readability).
Thanks!
Martin