
Eric Niebler: ...
namespace { // This reference should also be statically initialized placeholder<mpl::int_<1> > const & _1 = placeholder_instance<mpl::int_<1> >::value; }
This is a problem for some precompiled header implementations. Some compilers have fixed theirs to allow it, some have not, some only allow(ed?) it when the variables are static. Our tests don't show the problem since they don't use precompiled headers. So we've relied on bug reports to iron these out, leading to the current status quo in boost/bind/placeholders.hpp. Using inline functions: static inline boost::arg<1> _1() { return boost::arg<1>(); } is the most conservative option since it works everywhere, but it does have the disadvantage that one cannot overload operators for _1.