aboutsummaryrefslogtreecommitdiff
path: root/xml/value-traits
diff options
context:
space:
mode:
Diffstat (limited to 'xml/value-traits')
-rw-r--r--xml/value-traits16
1 files changed, 16 insertions, 0 deletions
diff --git a/xml/value-traits b/xml/value-traits
index 3bf10e0..0c79229 100644
--- a/xml/value-traits
+++ b/xml/value-traits
@@ -39,6 +39,22 @@ namespace xml
}
};
+ template <>
+ struct LIBSTUDXML_EXPORT default_value_traits<std::string>
+ {
+ static std::string
+ parse (std::string s, const parser&)
+ {
+ return s;
+ }
+
+ static std::string
+ serialize (const std::string& v, const serializer&)
+ {
+ return v;
+ }
+ };
+
template <typename T>
struct value_traits: default_value_traits<T> {};