-> returns a pointer and you're trying to assign it's value without dereferencing. do you perhaps want to return a T&?