首页>
外国专利>
Method of, system for, and article of manufacture for providing a generic adaptor for converting from a non-future function pointer to a future function object
Method of, system for, and article of manufacture for providing a generic adaptor for converting from a non-future function pointer to a future function object
展开▼
机译:提供通用适配器以从非未来功能指针转换为未来功能对象的方法,系统和制造品
展开▼
页面导航
摘要
著录项
相似文献
摘要
A generic adaptor for converting from a non-future function pointer to a future function object is provided by a future template class that provides type definitions and member functions for future-based operations and by a future template function that is an adaptor from a non-future function pointer to an object that is an instance of the future template class instance. The generic adaptor takes a non-future function pointer, builds a future function object by passing the non-future function pointer to a constructor of the future function template class instance, and returns the future function object. The future template class is a subclass of a template class of the non-future function. This future template class is defined for a function such that the class exports a type definition for the future function type it defines; such that a constructor takes a function pointer corresponding to the non-future function and saves the function pointer; and such that a member operator takes a list of arguments to be passed to the saved function pointer, schedules a task to compute the function, and returns a future function object.
展开▼