Index: boost/phoenix/core/limits.hpp =================================================================== --- boost/phoenix/core/limits.hpp (working copy) +++ boost/phoenix/core/limits.hpp (working copy) @@ -18,3 +18,7 @@ #if defined(BOOST_PHOENIX_LIMIT) -#define BOOST_PROTO_MAX_ARITY BOOST_PHOENIX_LIMIT +# if !defined( BOOST_PROTO_MAX_ARITY ) +# define BOOST_PROTO_MAX_ARITY BOOST_PHOENIX_LIMIT +# elif (BOOST_PROTO_MAX_ARITY < BOOST_PHOENIX_LIMIT) +# error "BOOST_PROTO_MAX_ARITY is set too low" +# endif #include Index: libs/phoenix/test/Jamfile =================================================================== --- libs/phoenix/test/Jamfile (working copy) +++ libs/phoenix/test/Jamfile (working copy) @@ -129,2 +129,3 @@ [ run regression/bug7165.cpp ] + [ compile-fail regression/bug7166.cpp ] ; Index: libs/phoenix/test/regression/bug7166.cpp =================================================================== new file mode 100644 --- libs/phoenix/test/regression/bug7166.cpp (revision 0) +++ libs/phoenix/test/regression/bug7166.cpp (working copy) @@ -0,0 +1,7 @@ +#define BOOST_PROTO_MAX_ARITY 10 +#define BOOST_PHOENIX_LIMIT 20 +#include + +int main() +{ +}