Hi,all

I want to cast string to long long type and handle overflow. I tested as follow.

long long somevar = lexical_cast<long long>("123456789789789798879977978789787987879879787977897897897899879978798798798");//!!!!!!!!!!!!!!

But it does not throw an exception!!

It seem that casting to int does not have this kind of problem.

int somevar2 = lexical_cast<int>("123456789789789798879977978789787987879");//will throw an exception