https://llvm.org/bugs/show_bug.cgi?id=25357
Bug ID: 25357 Summary: Subscript operator applied to an temporary array results in an lvalue Product: clang Version: 3.7 Hardware: PC OS: All Status: NEW Severity: normal Priority: P Component: C++14 Assignee: unassignedclangb...@nondot.org Reporter: yaghmour.sha...@gmail.com CC: llvm-bugs@lists.llvm.org Classification: Unclassified This Stackoverflow question http://stackoverflow.com/questions/33161003/using-a-temporary-array-as-an-lvalue provides the following code: using Y = int[10]; int main() { (Y { })[0] = 1; } which compiles without diagnostic, if I am reading CWG defect report 1213 correctly http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#1213 then the result of the subscript operator should be an xvalue and therefore not assignable to. Is this a correct interpretation? The clang defect report status page does list the status of DR 1213 as unknown http://clang.llvm.org/cxx_dr_status.html but since this has come up on a couple of SO questions already I thought it was worth it to file a bug report. I have a Wandbox example here http://melpon.org/wandbox/permlink/tiLfQnvsvBsAtNZv -- 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