Make the router const correct
Subtly, the individual members of a const std::pair are not implicitly
const. In most cases, this is solved by a compiler error, but it seems
that flat_map allows implicitly pulling out by a non const reference,
even when the underlying container is const. This is not how the maps
should work.
This commit changes the router to declare a "ChildMap" type, which can
then use the value_type to make this const correctness stuff more
reasonable to manage.
Tested: Code compiles. No-op const change.
Signed-off-by:
Ed Tanous <edtanous@google.com>
Change-Id: Id99079a86e392a03416a69506934dbfff7bc3b29
Loading
Please register or sign in to comment