Give template parameters more meaningful names

This commit is contained in:
Mike Bierlee 2014-05-15 23:49:42 +02:00
parent 5df222f509
commit 6fb34bb233

View file

@ -15,13 +15,13 @@ class Container {
private this() {
}
public static Registration register(T)() {
Registration newRegistration = { typeid(T) };
public static Registration register(ClassType)() {
Registration newRegistration = { typeid(ClassType) };
registrations[newRegistration.registratedType] = newRegistration;
return newRegistration;
}
public static T resolve(T)() {
return cast(T) registrations[typeid(T)].getInstance();
public static ClassType resolve(ClassType)() {
return cast(ClassType) registrations[typeid(ClassType)].getInstance();
}
}