For example, we have class Point and we start program ./cli distance "1,2" "2,1"
class Point {
public:
Point(int x, int y) : x(x), y(y) {};
int x, y;
static Point convert(const std::string& value) {
int x, y;
// code
return {x, y};
}
}
And we want to create convert function, which will convert "1,2" to (Point){1,2}