http://llvm.org/bugs/show_bug.cgi?id=17814

            Bug ID: 17814
           Summary: slice_array::operator= cannot use braced-init-list for
                    its argument
           Product: libc++
           Version: unspecified
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: All Bugs
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]
    Classification: Unclassified

The following code cannot be compiled with clang and libc++ r193963:

#include <valarray>

int main()
{
    std::valarray<char> a(10);
    a[std::slice(0, 2, 3)] = {'x', 'y'};
}


According to C++ standards(ISO/IEC 14882-2011),

1) a[std::slice(0, 2, 3)] returns slice_array<char>
2) slice_array<char> has a member function operator=(const valarray<char>&)
3) valarray<char> has a constructor valarray(initializer_list<char>)

Therefore, this code should be compiled successfully.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to