$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2008-05-13 12:29:53
AMDG
Marco Costalba wrote:
> BTW MSF implementation _really_ needs set() and not only operator=(),
> because for SFINAE to work I need an additional (hidden) argument for
> each assignment call. Indeed if you look at overload.hpp, operator=()
> implementation is just:
>
>
> template<typename Fun>
> function& operator=(Fun const& f)
> {
> this->set(f);
> return *this;
> }
>
> And set() is a public method so it is usable directly by the user.
>
>
For everything but constructors, you can use SFINAE on the return type.
template<typename Fun>
typename boost::enable_if<..., function&>::type operator=(Fun const& f);
In Christ,
Steven Watanabe