Modify

Opened 8 years ago

Last modified 4 years ago

#3783 new Feature Requests

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 8 years ago.
test_is_callable_with_args.cpp (3.5 KB) - added by Eric Niebler 8 years ago.
is_callable_with_args_impl.hpp (1.4 KB) - added by Eric Niebler 8 years ago.

Download all attachments as: .zip

Change History (4)

Changed 8 years ago by Eric Niebler

Attachment: is_callable_with_args.hpp added

Changed 8 years ago by Eric Niebler

Changed 8 years ago by Eric Niebler

comment:1 Changed 4 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.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The owner will remain John Maddock.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.