In France, in particular, a lot of campsites enforce a ‘swimming trunks only’ rule for men. It is clearly marked on the campsite page if this is a requirement. This is due to French Health regulations. Sites that are ‘swimming trunks’ only usually sell trunks in an onsite shop.
Some sites (mostly Italian) require the use of swimming caps. Please see individual campsite information for details.