Add additional PBD::string_to/to_string specializations for PBD::ID

This commit is contained in:
Tim Mayberry 2017-04-15 22:02:40 +10:00
parent baa1bff5ec
commit 1ce58ad90a
1 changed files with 12 additions and 0 deletions

View File

@ -43,6 +43,18 @@ inline bool string_to (const std::string& str, ID& val)
return true;
}
template <>
inline std::string to_string (ID val)
{
return val.to_s();
}
template <>
inline ID string_to (const std::string& str)
{
return ID(str);
}
} // namespace PBD
#endif // PBD_TYPES_CONVERT_H