Boost logo

Boost Users :

Subject: Re: [Boost-users] reference_wrapper
From: Igor R (boost.lists_at_[hidden])
Date: 2009-08-03 11:25:33


> 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.


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