Skip to content

Instantly share code, notes, and snippets.

@jpf91
Created February 22, 2013 12:14
Show Gist options
  • Save jpf91/5013042 to your computer and use it in GitHub Desktop.
Save jpf91/5013042 to your computer and use it in GitHub Desktop.
struct Date
{
uint data;
~this(){data = 10;} //non-POD
this(this) {data = 42;}
}
void func(Date d) {d.data++;}
void main()
{
auto d = Date(42);
func(d);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment