79167251

Date: 2024-11-07 16:13:06
Score: 1
Natty:
Report link

another simple way without the use of macros

std::string stringize(double d, unsigned int p=3 )
{
    std::stringstream ss;
    ss << std::setprecision(p) << d;
    return ss.str();
}

double default_value = 2.5;    
value(&config.my_double)->default_value(default_value, stringize(default_value));
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Vincent P LaBella