Welcome to the forums.
I would have a good talk with the host or hostess before the event and explain the situation, not asking them to plan the meal around my diet needs, but to alert them that I would not be eating anything I couldn't. I would take over some foods I could eat in case there was nothing on the menu I could tolerate. If I start getting the 'it can't hurt just this once' routine, I would say that it would and I wouldn't want to ruin the fun by having to be rushed to hospital (an exaggeration perhaps but true). I would enjoy the time spent together and let any lack of understanding roll off my back. It's about the company and not about the food.