The BOOST_PP_IS_ITERATING macro is defined when a file-iteration is in progress.

Usage

#if !defined(BOOST_PP_IS_ITERATING) // ...

Remarks

If a file-iteration is in progress, this macro is defined as 1.  This means that the following will also work:
#if !BOOST_PP_IS_ITERATING // ...
This macro is defined to guard a file from infinite inclusion.