std::string str = "12345679012.124678";
double back = boost::lexical_cast<double>( str );
std::string str2 =boost::lexical_cast<std::string>( back );
//here str2 is equal to str
Is it normal that there is no loss here (i.e final string = orignal string) even if number’s significand digits is greater than std::numeric_limit<double>::digits10 (i.e 15)?
Yes, it is normal.
std::numeric_limit<double>::digits10refers to a maximum amount of digits where casting is warranted not lossy.This does not imply losses using wider numbers than the limit, only implies an increasing probability of loss.