|
Boost Users : |
Subject: [Boost-users] Boost.container iterator_traits and flat_map
From: gast128 (gast128_at_[hidden])
Date: 2014-12-21 12:28:58
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?
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net