I'd like to clarify, since my dad taught for 30 years and he saw all manner of stuff, teaching boys and girls from middle school to high school. He basically ignored the dress code if a T-shirt would have been fine on a smaller-chested girl, and it didn't work for someone that had a larger chest. He just didn't give a shit about the dress code, because he knew it would be fine if their proportions were different (say, if the girl was six inches taller), and there was no arguing with genetics sometimes. He even argued with the principal, the vice principal and the superintendent on more than one occasion and actually got suspensions overturned in more than one instance as a result of his logic. The girls always thanked him for sticking up for them.
... He still didn't put up with girls who tried to get away with wearing half-shirts or tops. Either you wore a sensible shirt, or he broke out the school jerseys. If you were involved in his classes, you dressed decently. Same with the guys who tried going shirtless because they had the physique for it. He didn't put up with that either.