Add #include stdexcept.
Fixed function insert.

Signed-off-by: Serg Brych <sbrych@gmail.com>