All, I have bad news: A while back, I had the bad idea to import names into the global namespace in an effort to resolve differences between how BOOST implements things and how the upcoming C++ 1x standard does it. Specifically: - BOOST implements the placeholders _1, _2, etc one uses for boost::bind in the global namespace - C++ 1x requires that these are available in namespace std::placeholders My idea at the time was that whenever we use the compiler's facilities for std::bind, we'll just do using namespace std::placeholders and everyone can use _1, _2, etc just as one does in boost.
The problem is this doesn't work :-( If you have a compiler that supports C++1x (e.g. gcc 4.6), you import _1 into the global namespace, but if you happen to include some of the BOOST include files, the compiler complains when defining BOOST's ::_1 as that symbol already exists. The only way around this is to not import _1 into the global namespace. In order to make use of BOOST/C++1x facilities transparent, I now import either one or the other into namespace std_cxx1x so that one can again refer it under the same name, regardless of where it comes from. The downside is that if you use _1 in your programs, you'll have to write it as std_cxx1x::_1 from now on. The upside is that if you don't use the std_cxx1x::bind function and _1, _2, etc, then nothing needs to be changed. My apologies for the poor initial design and the incompatible change to fix it. Best W. ------------------------------------------------------------------------- Wolfgang Bangerth email: [email protected] www: http://www.math.tamu.edu/~bangerth/ _______________________________________________ dealii mailing list http://poisson.dealii.org/mailman/listinfo/dealii
