Fixed string constructor for fs::meta_value (#9580)

In absence of a constructor that explicitly took 'const char *', passing a const char * would be interpretted as a bool
This commit is contained in:
npwoods 2022-04-17 18:07:47 -04:00 committed by GitHub
parent ee7656dbb2
commit fc64f601f7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -54,6 +54,7 @@ public:
meta_value() { value = false; }
meta_value(std::string &&str) { value = std::move(str); }
meta_value(std::string_view str) { value = std::string(str); }
meta_value(const char *str) { value = std::string(str); }
meta_value(bool b) { value = b; }
meta_value(int32_t num) { value = uint64_t(num); }
meta_value(uint32_t num) { value = uint64_t(num); }