I suspect DrPizza is assuming everything is okay once the girl has graduated.
Not quite. If there are absolutely zero outward signs that there's something sneaky going on prior to graduation, and they start dating a few months later, AND their ages are within 4 or 5 years, then it's not creepy & I don't think would draw too much criticism from a community.
But, where there appears to be "something sneaky going on", and they start dating "officially" at the girl's graduation party, and the guy is 20 years older than the girl, then I find it absolutely unacceptable.
By "something sneaky going on" - people aware that there's been at least some flirting going on - when dating commences immediately after graduation, the community is going to interpret it as something very well may have been going on during the student/teacher relationship. And, that is VERY unacceptable in any community I've ever been a member of.
However, a 40 year old teacher, commencing dating an 18 year old former student about a month after her graduation - completely undermines his respect within the community. If you want to date 18 year olds when you're 40, go for it. But you better plan on a different profession.