diff --git a/include/boost/smart_ptr/intrusive_ptr.hpp b/include/boost/smart_ptr/intrusive_ptr.hpp index ef682df..895a12f 100644 --- a/include/boost/smart_ptr/intrusive_ptr.hpp +++ b/include/boost/smart_ptr/intrusive_ptr.hpp @@ -245,7 +245,7 @@ template inline bool operator!=(T * a, intrusive_ptr const return a != b.get(); } -#if __GNUC__ == 2 && __GNUC_MINOR__ <= 96 +#if defined(__GNUC__) && __GNUC__ == 2 && __GNUC_MINOR__ <= 96 // Resolve the ambiguity between our op!= and the one in rel_ops