
7 May
2010
7 May
'10
5:46 p.m.
On 5/6/2010 11:09 AM, Manjunath Kudlur wrote:
Thanks, Joel. (Note to self : RTFM more often :)). I also discovered that I didn't have to make the readonly and readwrite classes templated. The following also works :
This is even simpler :
template<typename T> struct readonly : proto::callable { typedef const T& result_type; };
<snip>
If you define it like this:
template
namespace boost { namespace proto { template<class T> struct is_callable< readonly<T> > : mpl::true_ {}; template<class T> struct is_callable< readwrite<T> > : mpl::true_ {}; } }
HTH, -- Eric Niebler BoostPro Computing http://www.boostpro.com