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
Thanks! This has been resolved in clang 4.0.0: https://godbolt.org/g/ec8ymp