diff --git a/include/boost/circular_buffer/space_optimized.hpp b/include/boost/circular_buffer/space_optimized.hpp index 21681fd3..7c7a17bb 100644 --- a/include/boost/circular_buffer/space_optimized.hpp +++ b/include/boost/circular_buffer/space_optimized.hpp @@ -8,6 +8,12 @@ // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) +// Include the main header before this file's guard so it can include this file +// while the internal configuration macros are still defined. +#if !defined(BOOST_CIRCULAR_BUFFER_HPP) +#include +#endif + #if !defined(BOOST_CIRCULAR_BUFFER_SPACE_OPTIMIZED_HPP) #define BOOST_CIRCULAR_BUFFER_SPACE_OPTIMIZED_HPP diff --git a/test/space_optimized_test.cpp b/test/space_optimized_test.cpp index 8694fcdb..0bf3751b 100644 --- a/test/space_optimized_test.cpp +++ b/test/space_optimized_test.cpp @@ -6,6 +6,9 @@ // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) +// Include the adaptor header first to check that it is self-contained. +#define BOOST_CB_TEST +#include #include "test.hpp" #define CB_CONTAINER circular_buffer_space_optimized