From: David Abrahams (dave_at_[hidden])
Date: 2004-09-11 19:12:13
"Jonathan Turkanis" <technews_at_[hidden]> writes:
> "Daniel Wallin" <dalwan01_at_[hidden]> wrote in message
>> Jonathan Turkanis wrote:
>> > "David Abrahams" <dave_at_[hidden]> wrote in message
>> >>Don't you think it's time we generalized the hack into a nice macro
>> >>that generates the right code?
>> > I think so. In addition to prefix and postfix unary operators, there should
> be a
>> > binary version, too, right?
>> I have been toying with a more general solution to this problem, where
>> one can do things like:
>> check_dereference<T, is_convertible<mpl::_, U&> >
>> check_add<T, T, is_convertible<mpl::_, T> >
>> etc. I haven't used it anywhere yet, so I can't say if it's useful in
>> practice, but at least it was fun implementing. ;)
> I know the feeling. ;-)
> What I'd really like to be able to do is test assignability.
Forget it. Anything that can only be a member function is out. Also
anything that's implicitly-generated and can only be disabled by
making it private is out. operator= fails both tests :(
-- Dave Abrahams Boost Consulting http://www.boost-consulting.com
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk