https://bugs.llvm.org/show_bug.cgi?id=42060
Bug ID: 42060
Summary: Placement new operator in OpenCL C++
Product: clang
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: OpenCL
Assignee: unassignedclangb...@nondot.org
Reporter: dr...@jwdt.org
CC: anastasia.stul...@arm.com, llvm-bugs@lists.llvm.org
Using a placement new operator yields an error "'default new' is not supported
in OpenCL C++". I see the problem for "new" and for "operator new", but
placement new should simply call the constructor upon the memory that already
exists. So I think this should be allowed. Test case:
class foo
{
int a = 0;
int b = 0;
};
__kernel void test()
{
foo x;
new(&x) foo;
}
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs