context.cpp:35: error: passing
'const std::map<
std::basic_string<char, std::char_traits<char>, std::allocator<char> >,
float,
std::less<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >,
std::allocator<std::pair<
const std::basic_string<char, std::char_traits<char>, std::allocator<char> >,
float> > >'
as 'this' argument of
'_Tp& std::map<_Key, _Tp, _Compare, _Alloc>::operator[](const _Key&)
with
_Key = std::basic_string<char, std::char_traits<char>, std::allocator<char> >,
_Tp = float,
_Compare = std::less<std::basic_string<char, std::char_traits<char>, td::allocator<char> > >,
_Alloc = std::allocator<std::pair<
const std::basic_string<char, std::char_traits<char>, std::allocator<char> >,
float> >'
discards qualifiers
std::basic_string - , std::string, std::string - , char. , :
context.cpp:35: error: passing
'const std::map<
std::string,
float,
std::less<std::string>,
std::allocator<std::pair<const std::string, float> >
>'
as 'this' argument of
'_Tp& std::map<_Key, _Tp, _Compare, _Alloc>::operator[](const _Key&)
with
_Key = std::string,
_Tp = float,
_Compare = std::less<std::string>,
_Alloc = std::allocator<std::pair<const std::string> >'
discards qualifiers
_Compare () _Alloc (allocator) , ; , _Key _Tp :
context.cpp:35: error: passing
'const std::map<std::string, float>'
as 'this' argument of
'float& std::map<std::string, float>::operator[](const std::string&)
discards qualifiers
, . operator[] std::map<std::string, float>, const std::map<std::string, float> (.. this ). " ", , const.
, operator[] const, .. . , , .
? :
x , .
x , . , , ( ).
( ).
, , .
Why is he doing this? Well, we already have a question for this .