Pass by value instead of const ref, const_cast can modify the attributes and we don't want that.