The code you have has too many levels of implicit construction. "string literal"
is of type const char []
and not std::string
. Only one level of implicit construction occurs automatically. Try adding a constructor that takes const char *
instead:
class Version {
// ...
Version(const char *_vstr) : versionStr(_vstr) {}
// ...
}