On 23 February 2018 at 14:22, Pavlo Solntsev wrote:Yes, I did. because my goal is to getconst T& get_name()constmethod. I need to return a reference.Then you need to change your type to have a using member.
You can't have it both ways (return a reference, but not have something to bind the reference to).Pick one.