Boost.container iterator_traits and flat_map
21 Dec
2014
21 Dec
'14
5:28 p.m.
Hello all, I have a problem here which boils down to the non-constness of iterator_traits for const_iterator of flat_map: void Foo() { typedef boost::container::flat_map<int, int> Int2IntFmap; Int2IntFmap::const_iterator it2; std::iterator_traits<Int2IntFmap::const_iterator>::value_type::first_type& r2 = it2->first; } 1>d:\develop\shared\main\test\testcommon\testgeneral\nctstgenhmhandlemap.cpp(59): error C2440: 'initializing' : cannot convert from 'const int' to 'int &' Anyone an idea or should I use decltype instead?
3561
Age (days ago)
3561
Last active (days ago)
0 comments
1 participants
participants (1)
-
gast128