Is this downcast undefined behaviour?
I am trying to extend std::map‘s std::pair entries with some extra functionality and want to cast such pairs to a child class of pair. Note that this is the "wrong" direction of polymorphism, the child is not the parent. But since the memory layout should be identical as long as I am not introducing additional… Read More Is this downcast undefined behaviour?