【发布时间】:2014-02-16 15:04:31
【问题描述】:
我已经好几年没用过 C++了,刚刚遇到这个:
program.build({ default_device })
定义是:
cl_int build(
const VECTOR_CLASS<Device>& devices,
const char* options = NULL,
void (CL_CALLBACK * notifyFptr)(cl_program, void *) = NULL,
void* data = NULL) const
花括号有什么用?我以前从未见过它们在这样的函数调用中使用过。我认为它与函数指针有关,但这似乎是可选的?
【问题讨论】:
-
如何用元素列表初始化向量?