problem with intersection test_tools and mpl/list.hpp and borland

The following program: #include <boost/mpl/list.hpp> #include <boost/test/test_tools.hpp> fails to compile with borland compilers with the messages: c:\BoostMainCVS\libs\serialization\test\test_zmisc.cpp: Error E2479 C:\BoostMainCVS\boost/next_prior.hpp 30: Cannot have both a template class and function named 'next' Error E2479 C:\BoostMainCVS\boost/next_prior.hpp 34: Cannot have both a template class and function named 'next' Error E2479 C:\BoostMainCVS\boost/next_prior.hpp 40: Cannot have both a template class and function named 'prior' Error E2479 C:\BoostMainCVS\boost/next_prior.hpp 44: Cannot have both a template class and function named 'prior' *** 4 errors in Compile *** Could someone shed some light on this? Robert Ramey

"Robert Ramey" wrote:
The following program:
#include <boost/mpl/list.hpp> #include <boost/test/test_tools.hpp>
fails to compile with borland compilers with the messages:
c:\BoostMainCVS\libs\serialization\test\test_zmisc.cpp: Error E2479 C:\BoostMainCVS\boost/next_prior.hpp 30: Cannot have both a template class and function named 'next'
Old BCB bug, e.g. http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&c2coff=1&threadm=3BDD798D... (http://tinyurl.com/5ltk9) It won't be fixed, ever. One ugly way is to use macro: #include <boost/mpl/list.hpp> #define next xyz #include <boost/test/test_tools.hpp> #undef next other is to separate code into two TUs. /Pavel
participants (2)
-
Pavel Vozenilek
-
Robert Ramey