I want to overload the operator for my struct but I get the message "static member 'rating' cannot be used on instance of type 'GlobalSettings'". I already read couple answers to this error but the solutions there don't help me at all. How can I solve this problem?
struct GlobalSettings{
static var rating = false
}
func ==(l: GlobalSettings, r: GlobalSettings) -> Bool {
if l.rating == r.rating {
return true
}else{
return false
}
}