[llvm-bugs] [Bug 26656] New: std::swap does not work with vector types
via llvm-bugs
llvm-bugs at lists.llvm.org
Wed Feb 17 13:37:29 PST 2016
https://llvm.org/bugs/show_bug.cgi?id=26656
Bug ID: 26656
Summary: std::swap 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: unassignedclangbugs at nondot.org
Reporter: eugeni.stepanov at gmail.com
CC: llvm-bugs at lists.llvm.org, mclow.lists at gmail.com
Classification: Unclassified
#include <utility>
typedef float T __attribute__((__vector_size__(16)));
void f(T &a, T &b) {
std::swap(a, b);
}
1.cc:7:3: error: no matching function for call to 'swap'
std::swap(a, b);
^~~~~~~~~
/code/build-llvm/bin/../include/c++/v1/type_traits:4240:5: note: candidate
template ignored: disabled by 'enable_if' [with _Tp =
__attribute__((__vector_size__(4 * sizeof(float)))) float]
is_move_constructible<_Tp>::value &&
^
/code/build-llvm/bin/../include/c++/v1/utility:245:1: note: candidate template
ignored: could not match '_Tp [_Np]' against 'T'
(vector of 4 'float' values)
swap(_Tp (&__a)[_Np], _Tp (&__b)[_Np])
_NOEXCEPT_(__is_nothrow_swappable<_Tp>::value)
^
/code/build-llvm/bin/../include/c++/v1/utility:495:1: note: candidate template
ignored: could not match
'pair<type-parameter-0-0, type-parameter-0-1>' against
'__attribute__((__vector_size__(4 * sizeof(float)))) float'
(vector of 4 'float' values)
swap(pair<_T1, _T2>& __x, pair<_T1, _T2>& __y)
^
1 error generated.
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20160217/999282af/attachment.html>
More information about the llvm-bugs
mailing list