On Saturday 09 November 2002 11:45 pm, Aleksey Gurtovoy wrote:
>     template< typename T >
>     struct is_default_constructible
>
>         : mpl::bool_c<__is_well_formed(T())>
>
>     {
>     };
>
> Would it be enough for you to implement the 'is_callable' trait with the
> desired behavior?

Yep. We just need:

template<typename T> T get();

template<typename Functor, typename R, typename T1, typename T2, ..., 
         typename TN>
struct is_callable :
  mpl::bool_c<__is_well_formed(static_cast<R>(get<Functor>()(get<T1>(), 
get<T2>(), ..., get<TN>())))>
{
};

The reason I mention is_instantiable instead of __is_well_formed is that 
is_instantiable can keep a class template interface, whereas __is_well_formed 
would require a new grammar production.

        Doug
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Reply via email to