Lines Matching refs:capture
102 struct capture { remove_reference_t<Func> f; };
104 /* Store the function including any extra state it might have (e.g. a lambda capture object) */
107 /* Store the capture object directly in the function record if there is enough space */
108 if (sizeof(capture) <= sizeof(rec->data)) {
116 new ((capture *) &rec->data) capture { std::forward<Func>(f) };
121 rec->free_data = [](function_record *r) { ((capture *) &r->data)->~capture(); };
123 rec->data[0] = new capture { std::forward<Func>(f) };
124 rec->free_data = [](function_record *r) { delete ((capture *) r->data[0]); };
147 /* Get a pointer to the capture object */
148 auto data = (sizeof(capture) <= sizeof(call.func.data)
150 capture *cap = const_cast<capture *>(reinterpret_cast<const capture *>(data));
185 sizeof(capture) == sizeof(void *);
1164 struct capture { Func func; };
1165 capture *ptr = new capture { std::forward<Func>(func) };
1170 return new buffer_info(((capture *) ptr)->func(caster));