Boost logo

Boost :

Subject: Re: [boost] [TypeTraits] propose new callable-type call traits
From: TONGARI J (tongari95_at_[hidden])
Date: 2014-01-12 09:27:08


2014/1/12 Hui Li <hui.li_at_[hidden]>

>
> On Jan 12, 2014, at 4:54 AM, John Maddock <john_at_[hidden]> wrote:
>
> > I think that might make an excellent addition to type_traits - however,
> I have no time at present to do anything on this myself, so you would have
> to provide a complete solution, including docs and tests etc.
>
> I would provide a complete solution including docs and tests. But i will
> have to learn how to do things the boost way since this would be my first
> contribute. Would appreciate if anyone could point me to some general
> guidelines and maybe also on for example how to work with boost Github etc.
>
> > As others have mentioned, reliance on SFINAE-expressions is an issue
> because msvc still doesn't fully support this.
>
> As for SFINAE-expression, I agree with Tongari J. that it seems necessary
> to be able to distinguish ambiguous and non-viable calls. Do you maybe have
> any ideas for workaround? Is it unacceptable if it doesn't support those
> compilers like msvc?
>
> > Other than that, we probably should have one eye towards programming in
> C++11 these days...
>
> I'm not sure if my implementation should have the same user interface as
> boost::has_call (since it came to existence first).
> I suppose mine could've looked like this:
> 1. has_valid_call<T, R(Args...)> // same as
> boost::has_call<T, R(Args...)>
> 2. has_ambiguous_call<T, R(Args...)> // R is ignored
> 3. has_no_viable_call<T, R(Args...)> // R is ignored
> Any thoughts?
>
> Or maybe i could extend boost::has_call by adding
> has_ambiguous_call<T,R(Args...)> and has_no_viable_call<T,R(Args...)> (for
> c++11 only though). I think it may be better than providing another
> standalone implementation that has overlapping functionalities with
> boost::has_call.
>

Note that boost::has_call is *not* part of official Boost, it's still my
personal work, so feel free to do whatever you want.
As I mentioned, you could take the doc/test/code on my github :)


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk