Here in the UK, employers aren't allowed to stop you talking about your pay as long as you are talking about it to make sure that protected characteristics aren't being discriminated against.
So realistically anyone can talk about it because nobody is exactly the same in those areas and good luck trying to prove otherwise.
I wish people understood this better as I've seen far too many people bullied into silence in the past!