Regarding _SECURE_SCL we are using ubuntu linux and Eclipse for C++ so i guess the above won't work.
No, _SECURE_SCL is a feature of STL coming with MSVC, it's not
relevant for gcc/linux.
So all you can do is to use the hinted insert() and compile with -O3.