mirror of
https://github.com/dlang/phobos.git
synced 2025-05-06 19:16:13 +03:00
fix Issue 11853 - Tuples fail "isAssignable"
This commit is contained in:
parent
cb7cd89e06
commit
5d583483e3
1 changed files with 8 additions and 1 deletions
|
@ -1997,7 +1997,7 @@ See_Also:
|
|||
void swap(T)(ref T lhs, ref T rhs) @trusted pure nothrow
|
||||
if (allMutableFields!T && !is(typeof(T.init.proxySwap(T.init))))
|
||||
{
|
||||
static if (!isAssignable!T || hasElaborateAssign!T)
|
||||
static if (hasElaborateAssign!T || !isAssignable!T)
|
||||
{
|
||||
import std.exception : pointsTo;
|
||||
|
||||
|
@ -2168,6 +2168,13 @@ unittest
|
|||
static assert(!__traits(compiles, swap(s, s)));
|
||||
}
|
||||
|
||||
unittest
|
||||
{
|
||||
//11853
|
||||
alias T = Tuple!(int, double);
|
||||
static assert(isAssignable!T);
|
||||
}
|
||||
|
||||
void swapFront(R1, R2)(R1 r1, R2 r2)
|
||||
if (isInputRange!R1 && isInputRange!R2)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue