This question is not bound to any specific compiler warning, the following is just an example.
Currently when I want a loop that checks an exit condition inside:
What could be -- realistically implementable -- more elegant that a single line of:
#pragma warning ( suppress : 4127 )
(I can't use this as I'm still on VS2005 where this doesn't work for all warnings.)
Certainly, for your case for(;;)
could be the pragmatic approach, but in general
How to overcome pointless C++ compiler warnings elegantly?
I'd say disable them project wide. (there pointless after all). And, to variate
How to overcome false-positve C++ compiler warnings elegantly?
I'd say, a single preprocessor line seems quite OK already.