On Saturday, 22 November 2014 at 02:37:21 UTC, Eric wrote:
I know I can make a class immutable, but the problem is I want
to constrain a template parameter to only immutable types,
and I want to use class types.

template Foo(T : immutable Object)

Accepts immutable(Object) and other immutable class types.
Rejects non-immutable class types like Object and const(Object),
and non-class types.

Reply via email to