On 10.01.2016 05:26, Glen Fernandes wrote:
If there are macros in your public headers that are defined but always undefined, then it won't impact users of your library.
That's not necessarily true. Consider:
For example, for Boost.Something, in boost/something/file.hpp:
#ifndef BOOST_LIBRARY_SOMETHING_FILE_HPP #define BOOST_LIBRARY_SOMETHING_FILE_HPP // ... #if defined(__INTEL_COMPILER) #define BOOST_SOMETHING_USING_ICC #endif // ... #if !defined(BOOST_NO_CXX11_ALLOCATOR) #define SHOULD_USE_ALLOCATOR_TRAITS #endif // ... #undef SHOULD_USE_ALLOCATOR_TRAITS // ... #endif
#define SHOULD_USE_ALLOCATOR_TRAITS
#include