[cfe-dev] objc++ enhancements for new c++ features

John McCall via cfe-dev cfe-dev at lists.llvm.org
Thu Mar 29 12:30:02 PDT 2018


> On Mar 29, 2018, at 3:19 PM, James Gregurich <bayoubengalml at mac.com> wrote:
>> On Mar 29, 2018, at 2:01 PM, John McCall via cfe-dev <cfe-dev at lists.llvm.org <mailto:cfe-dev at lists.llvm.org>> wrote:
>> 
>> If you could write @selector(-NSWidget.foo:bar:), and that you gave you a SEL<void(NSWidget*, float, std::unique_ptr<Gadget> &&)>,
> 
> How would you write the template arguments that would accept this parameterized SEL type?

template <class... ParamTys>
void dispatch_sel_after(dispatch_time_t when, dispatch_queue_t queue, SEL<void(ParamTys...)> sel, std::enable_if<true, ParamTys>::type &&... params) {
  ...
}

Thinking about it, it would probably be easier to use dispatch_after_f than the blocks API in the implementation.

John.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20180329/13777dfb/attachment.html>


More information about the cfe-dev mailing list