Boost logo

Boost :

Subject: Re: [boost] boost policy against inline friend functions?
From: Frank Mori Hess (frank.hess_at_[hidden])
Date: 2009-10-26 15:48:11


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Monday 26 October 2009, Stefan Strasser wrote:
> what's wrong with
> template<class Y> friend bool operator<(shared_ptr<Y> const & rhs)
> const {
> return pn < rhs.pn;
> }
> in class shared_ptr?
>
> compiler compatibility? other reasons?
> should boost libraries avoid inline friend functions in general?

Apparently some compilers don't support template friends. There is the
BOOST_NO_MEMBER_TEMPLATE_FRIENDS config macro to detect this though.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEARECAAYFAkrl/PsACgkQ5vihyNWuA4URYgCfb2IcHoiFJAFwuivQnR89JfTH
Ty8AnijmNMSSB9tmHpR5M95kBSD6TDs/
=MwTI
-----END PGP SIGNATURE-----


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk