Type-qualified functions?

Sean Eskapp eatingstaples at gmail.com
Fri Jan 21 06:08:58 PST 2011


How does one avoid code duplication in a snippet code like this:

class A{}

void foo(const A, void delegate(const A) fn)
{
	// some stuff
	// ...
	// ...
}

void foo(A, void delegate(A) fn)
{
	// exact same stuff, with different qualifiers
	// ...
	// ...
}


More information about the Digitalmars-d-learn mailing list