Opened 9 years ago

Closed 5 months ago

#3783 closed Feature Requests (obsolete)

add is_callable_with_args trait

Reported by: Eric Niebler Owned by: John Maddock
Milestone: Boost 1.42.0 Component: type_traits
Version: Boost 1.41.0 Severity: Not Applicable
Keywords: Cc:

Description

Per this thread: here

and the needs of Proto as discussed here: here

as well as a hypothesized use case in Boost.Bind as discussed in the first link above, a "is_callable_with_args" function trait would be quite useful. It would be a Boolean metafunction that determines whether a certain callable type were callable with certain argument types.

I am attaching to this feature request a simple implementation (ignores calling convention on function types), and some simple test cases (needs to be fleshed out). Also needs documentation.

Attachments (3)

is_callable_with_args.hpp (3.8 KB) - added by Eric Niebler 9 years ago.
test_is_callable_with_args.cpp (3.5 KB) - added by Eric Niebler 9 years ago.
is_callable_with_args_impl.hpp (1.4 KB) - added by Eric Niebler 9 years ago.

Download all attachments as: .zip

Change History (5)

Changed 9 years ago by Eric Niebler

Attachment: is_callable_with_args.hpp added

Changed 9 years ago by Eric Niebler

Changed 9 years ago by Eric Niebler

comment:1 Changed 5 years ago by viboes

Component: function_typestype_traits
Owner: changed from t_schwinger to John Maddock

Changed to type_traits as it seems John would accept these if there is some documentation.

comment:2 Changed 5 months ago by John Maddock

Resolution: obsolete
Status: newclosed
Note: See TracTickets for help on using tickets.