https://llvm.org/bugs/show_bug.cgi?id=26654
Bug ID: 26654 Summary: std::unique_ptr<[]> does not work with vector types Product: libc++ Version: 3.8 Hardware: PC OS: Linux Status: NEW Severity: normal Priority: P Component: All Bugs Assignee: unassignedclangb...@nondot.org Reporter: eugeni.stepa...@gmail.com CC: llvm-bugs@lists.llvm.org, mclow.li...@gmail.com Classification: Unclassified $ cat 1.cc #include <memory> typedef float T __attribute__((__vector_size__(16))); void f(T t) { std::unique_ptr<T[]> ptr(new T[5]); ptr[0] = t; } $ clang++ 1.cc -c -std=c++11 -stdlib=libc++ 1.cc:13:10: error: expression is not assignable ptr[0] = get(); ~~~~~~ ^ 1 error generated. It looks like __is_referenceable<T> is false and unique_ptr<T>::operator[]() gets T as the return type instead of T&. -- You are receiving this mail because: You are on the CC list for the bug.
_______________________________________________ llvm-bugs mailing list llvm-bugs@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs