Boost logo

Boost Users :

Subject: Re: [Boost-users] [FunctionTypes] Testing for a general callable type.
From: Nevin Liber (nevin_at_[hidden])
Date: 2013-03-25 15:22:51


On 22 March 2013 08:15, TONGARI <tongari95_at_[hidden]> wrote:

>
> https://github.com/jamboree/boost.has_call
>

It doesn't seem to work with default arguments. :-(

Here is my test case (under gcc 4.7.2 -std=c++0x):

#include "boost/type_traits/has_call.hpp"
#include <cassert>

template<typename Sig, typename F>
bool HasCall(F const&)
{ return boost::has_call<F, Sig>::value; }

void DefaultVal(int = 0) {}

int main()
{
    assert(HasCall<void()>(DefaultVal));
}

-- 
 Nevin ":-)" Liber  <mailto:nevin_at_[hidden]>  (847) 691-1404


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net