Skip to content

Instantly share code, notes, and snippets.

@Marenz
Created November 9, 2016 13:46
Show Gist options
  • Save Marenz/6854ca8c4ff4575bf8b0d70813f33f7a to your computer and use it in GitHub Desktop.
Save Marenz/6854ca8c4ff4575bf8b0d70813f33f7a to your computer and use it in GitHub Desktop.
    int opApply ( scope int delegate ( T element ) @nogc dg ) const @nogc
{
int forward ( size_t, ref T el ) @nogc
{
return dg(el);
}
return (cast(SyncedArray!T)this).opApply(&forward);
}  
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment