changeset 428:115678dd30b7

struct / opEqual mixin Ben Hinkle <ben.hinkle@gmail.com> 2005-04-11 news:d3f87v$14n7$1@digitaldaemon.com
author thomask
date Tue, 12 Apr 2005 16:16:17 +0000
parents 21344af2174f
children 1185c50d4b08
files reporter.txt run/mixin_11.d
diffstat 2 files changed, 34 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/reporter.txt	Tue Apr 12 15:56:35 2005 +0000
+++ b/reporter.txt	Tue Apr 12 16:16:17 2005 +0000
@@ -5,7 +5,7 @@
 Ant			<duitoolkit@yahoo.ca>
 Arcane Jill
 Bastiaan Veelo		<Bastiaan.N.Veelo@ntnu.no>
-Ben Hinkle 		<bhinkle4@juno.com>, <bhinkle@mathworks.com>
+Ben Hinkle 		<bhinkle4@juno.com>, <bhinkle@mathworks.com>, <ben.hinkle@gmail.com>
 Bent Rasmussen 		<exo@bent-rasmussen.info>
 berupon 		<yu@3dcg.ne.jp>
 Brian Gardner		<briangr@friberg.us>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/run/mixin_11.d	Tue Apr 12 16:16:17 2005 +0000
@@ -0,0 +1,33 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// @author@	Ben Hinkle <ben.hinkle@gmail.com>
+// @date@	2005-04-11
+// @uri@	news:d3f87v$14n7$1@digitaldaemon.com
+
+module dstress.run.mixin_11;
+
+int status;
+
+template Share(T) {
+	int opEquals(T x){
+		return status;
+	}
+}
+
+struct List(T){
+	mixin Share!(List);
+}
+
+int main(){
+	List!(int) x;
+	List!(int) y;
+	
+	assert(x!=y);
+	status=1;
+	assert(x==y);
+
+	return 0;
+}
+