template
inline boost::mpl::true_* boost_foreach_is_noncopyable( boost::multi_index::detail::sequenced_index *&, boost::foreach::tag) { return 0; } Unfortunately Qt (in some configuration modes, at least), defines a macro foreach to Q_FOREACH, which produces the following problem, even if Boost.Foreach was not intended to be used:
btw, this can easily be workarounded by using push_macro/pop_macro pragmas on the most widely used compilers.
I'm rather conversative and prefer a pragma-free workaround: I don't know which exact compiler versions support push_macro etc.
https://github.com/boostorg/foreach/pull/4/files it is supported by msvc for ages and by gcc since 4.6 and clang ...
i've submitted some pull requests about this for several libraries, but some devs prefer to blame qt for introducing pseudokeywords instead of merging the workarounds
The problem is that blaming Qt puts the burden on their blameless users... I'm all for workarounds if they're not overkill.
simply blaming qt is much easier than merging a fix :( iirc this fix would be needed by foreach, multiindex and flyweight ... so definitely no overkill that would help a lot of users ...