Can't compile boost/any_iterator.hpp in boost 1.57

后端 未结 1 1050
伪装坚强ぢ
伪装坚强ぢ 2020-12-11 16:23

After (attempting to) upgrade a VS2012 project to use boost 1.57, I can no longer compile--lots and lots of error messages coming out of boost/any_iterator.hpp

相关标签:
1条回答
  • 2020-12-11 17:22

    This appears to be a bug in the boost codebase. postfix_increment_proxy and writable_postfix_increment_proxy are both in the boost::iterators::detail namespace (iterator_facade.hpp). However, both names are used unqualified in any_iterator.hpp. Adding boost::iterators::detail:: in front of both names allows the code to compile.

    For anyone who's uncomfortable with the idea of editing boost code, including iterator_facade.hpp followed by using namespace boost::iterators::detail followed by an include for any_iterator.hpp will also solve the problem at the cost of namespace pollution. VS2012 doesn't support them so it doesn't do me any good, but you could presumably use a C++11 using too.

    Ticket submitted: https://svn.boost.org/trac/boost/ticket/10754

    0 讨论(0)
提交回复
热议问题