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

            Bug ID: 20614
           Summary: slice_array::operator = should be return *this
           Product: libc++
           Version: 3.3
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: All Bugs
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected]
    Classification: Unclassified

In <valarray>, slice_array::operator= (and other compound assignment operators,
gslice_array's, mask_array's, ...) should be return *this.


// in include/c++/v1/valarray:1213

template <class _Tp>
inline _LIBCPP_INLINE_VISIBILITY
const slice_array<_Tp>&
slice_array<_Tp>::operator=(const slice_array& __sa) const
{
    value_type* __t = __vp_;
    const value_type* __s = __sa.__vp_;
    for (size_t __n = __size_; __n; --__n, __t += __stride_, __s +=
__sa.__stride_)
        *__t = *__s;
}

-- 
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