Skip to content

Commit

Permalink
Revert "Revert "Merge pull request #120 from 9rnsr/rvalue-struct-lite…
Browse files Browse the repository at this point in the history
…ral""

This reverts commit 8a6bfd2.
  • Loading branch information
9rnsr committed Feb 21, 2012
1 parent 2d29da7 commit 66e13b2
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 4 deletions.
2 changes: 1 addition & 1 deletion std/bigint.d
Expand Up @@ -336,7 +336,7 @@ public:
}

///
bool opEquals(Tdummy=void)(ref const BigInt y) const
bool opEquals()(auto ref const BigInt y) const
{
return sign == y.sign && y.data == data;
}
Expand Down
9 changes: 6 additions & 3 deletions std/concurrency.d
Expand Up @@ -496,7 +496,8 @@ private void _send(T...)( Tid tid, T vals )
*/
private void _send(T...)( MsgType type, Tid tid, T vals )
{
tid.mbox.put( Message( type, vals ) );
auto msg = Message( type, vals );
tid.mbox.put( msg );
}


Expand Down Expand Up @@ -1042,7 +1043,8 @@ private
if( *depends && tid != owner )
{
auto e = new LinkTerminated( tid );
if( onStandardMsg( Message( MsgType.standard, e ) ) )
auto msg = Message( MsgType.standard, e );
if( onStandardMsg( msg ) )
return true;
throw e;
}
Expand All @@ -1051,7 +1053,8 @@ private
{
owner = Tid.init;
auto e = new OwnerTerminated( tid );
if( onStandardMsg( Message( MsgType.standard, e ) ) )
auto msg = Message( MsgType.standard, e );
if( onStandardMsg( msg ) )
return true;
throw e;
}
Expand Down
12 changes: 12 additions & 0 deletions std/container.d
Expand Up @@ -922,6 +922,12 @@ Comparison for equality.
Complexity: $(BIGOH min(n, n1)) where $(D n1) is the number of
elements in $(D rhs).
*/
bool opEquals(const SList rhs) const
{
return opEquals(rhs);
}

/// ditto
bool opEquals(ref const SList rhs) const
{
const(Node) * n1 = _root, n2 = rhs._root;
Expand Down Expand Up @@ -1634,6 +1640,12 @@ struct Array(T) if (!is(T : const(bool)))
/**
Comparison for equality.
*/
bool opEquals(const Array rhs) const
{
return opEquals(rhs);
}

/// ditto
bool opEquals(ref const Array rhs) const
{
if (empty) return rhs.empty;
Expand Down
12 changes: 12 additions & 0 deletions std/datetime.d
Expand Up @@ -799,6 +799,12 @@ public:
Note that the time zone is ignored. Only the internal
std times (which are in UTC) are compared.
+/
bool opEquals(const SysTime rhs) const pure nothrow
{
return opEquals(rhs);
}

/// ditto
bool opEquals(const ref SysTime rhs) const pure nothrow
{
return _stdTime == rhs._stdTime;
Expand Down Expand Up @@ -30816,6 +30822,12 @@ public:


///
bool opEquals(const StopWatch rhs) const pure nothrow
{
return opEquals(rhs);
}

/// ditto
bool opEquals(const ref StopWatch rhs) const pure nothrow
{
return _timeStart == rhs._timeStart &&
Expand Down

0 comments on commit 66e13b2

Please sign in to comment.