On Wed, Feb 25, 2015 at 2:15 PM, Alin Popa
Hi,
I compile my project with boost header only files, the compiler is C6000 Texas Instruments.
The compile errors occurs for example in "boost/algorithm/string/find_iterator.hpp"
I have extracted the cause of the problem in the next example code:
namespace boost { namespace iterators { class iterator_core_access { public: iterator_core_access(){} ~iterator_core_access(){} }; } using iterators::iterator_core_access; } class testFriend { private: // don't work, compiler error: error: namespace "boost" has no actual member "iterator_core_access" friend class ::boost::iterator_core_access; // here is the problem // it works, compiles ok, this was my cure //friend class ::boost::iterators::iterator_core_access; };
int main () { // it works ::boost::iterator_core_access a; return 0; }
Do you guys know what is the reason of this ? With msvc and g++ works fine.
Most of Boost.Iterator components, including iterator_core_access, were moved to the boost::iterators namespace in recent releases. The names are imported into boost namespace for backward compatibility. As far as I can tell, this should be enough and the friend declaration should still be valid. If I'm not missing anything, this is a compiler issue.