binding const to reference of type discards qualifiers return value code example
Example: binding reference of type discards qualifiers
Error is simple. Your constructor takes const reference but then you try to bind it into non-const reference member.