[shared_ptr][1.33.0] Header includes troublesome win32 macros.

On win32 using VC7.1, the Windows macros 'CMYK' and 'RGB' are bleeding through the 'boost/shared_ptr.hpp' header file. These are my header file's includes up to and including the offending boost header: #include <algorithm> #include <functional> #include <iterator> #include <set> #include <stdexcept> #include <string> #include <utility> #include <vector> #include <boost/shared_ptr.hpp> #undef CMYK // I added this to make it compile. #undef RGB // I added this to make it compile. The declarations of my 'CMYK' and 'RGB' functions within this header compiled without error until I installed the 1.33.0 release of Boost. I had been using the CVS HEAD previously so the error must have been introduced during the week or two prior to release.

Jason Kankiewicz wrote:
On win32 using VC7.1, the Windows macros 'CMYK' and 'RGB' are bleeding through the 'boost/shared_ptr.hpp' header file.
These are my header file's includes up to and including the offending boost header:
#include <algorithm> #include <functional> #include <iterator> #include <set> #include <stdexcept> #include <string> #include <utility> #include <vector> #include <boost/shared_ptr.hpp> #undef CMYK // I added this to make it compile. #undef RGB // I added this to make it compile.
The declarations of my 'CMYK' and 'RGB' functions within this header compiled without error until I installed the 1.33.0 release of Boost. I had been using the CVS HEAD previously so the error must have been introduced during the week or two prior to release.
That's very odd; shared_ptr doesn't include windows.h unless BOOST_USE_WINDOWS_H is defined.
participants (2)
-
Jason Kankiewicz
-
Peter Dimov