Boost logo

Boost Users :

Subject: Re: [Boost-users] reference_wrapper
From: Frank Mori Hess (frank.hess_at_[hidden])
Date: 2009-08-03 11:29:42


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

On Monday 03 August 2009, Igor R wrote:
> > 1) I don't understand this part of reference_wrapper:
> >
> > template<class T> class reference_wrapper
> > {
> >        operator T& () const { return *t_; }
> > };
> >
> > Could someone please explain it?
>
> reference_wrapper<T> is a functor that returns T&. This is exactly
> what operator() does.

That's not operator(), it's conversion to T&.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEARECAAYFAkp3AmYACgkQ5vihyNWuA4XU7gCfd3EHeajC45OF1zugyJwp7NJR
ImgAn1ASVNk+/8AGdI+aVgt9qibTJwX2
=aoYZ
-----END PGP SIGNATURE-----


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net