I checked that protected access specifier can be used inside class, struct as well as union. I know that protected access specifier means that members will be private but visible to derived class. I am not able to reasonable use case where protected keyword inside union would be useful, because union can't be part of inheritance hierarchy. So in union private and protected would make no difference then why allow protected inside union too?
Thanks In Advance
Aucun commentaire:
Enregistrer un commentaire