Closed tocic closed 12 months ago
The doc says there is a member operator[](key_parameter_t key) const, but I can't find it here, and my sample program doesn't compile:
operator[](key_parameter_t key) const
#include <etl/unordered_map.h> int main() { const etl::unordered_map<int, int, 1> x{{1,1}}; x[0]; }
error: passing 'const etl::unordered_map<int, int, 1>' as 'this' argument discards qualifiers
I have updated the documentation
Looks like the sentence "Returns a reference or const reference to the indexed element" should be changed to "Returns a reference to the indexed element".
Thanks, fixed.
The doc says there is a member
operator[](key_parameter_t key) const
, but I can't find it here, and my sample program doesn't compile: