std::map< constint, float > and std::map< int, float > are two different types.
Other than that, there is no difference; the key in a map is a const anyway.
The value_type of std::map<KEY,DATA> is std::pair< const KEY, DATA >
1 2 3 4 5 6 7 8 9 10 11
template < typename T > struct A
{
A() = default ;
A( const T& k ) : key(k) {}
const T key = T() ;
};
A<int> a ; // type of a.key is const int
A< constint > a2 ; // type of a2.key is const int
// 'const const T' collapses to 'const T'