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

John McCall via cfe-dev cfe-dev at lists.llvm.org
Thu Mar 29 13:03:22 PDT 2018


> On Mar 29, 2018, at 3:43 PM, James Gregurich <bayoubengalml at mac.com> wrote:
>> On Mar 29, 2018, at 2:30 PM, John McCall <rjmccall at apple.com <mailto:rjmccall at apple.com>> wrote:
>> 
>>> On Mar 29, 2018, at 3:19 PM, James Gregurich <bayoubengalml at mac.com <mailto: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.
> 
> 
> would you also modify the stl to supply specializations of packaged_task<> and function<> that could accept the parameterized selector type?

That would not be necessary; those types already work with any callable type.

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


More information about the cfe-dev mailing list