aboutsummaryrefslogtreecommitdiff
path: root/cutl/xml/value-traits.txx
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2020-12-16 20:29:05 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2021-02-24 16:40:04 +0300
commit8e761289a2446367267c6c0d9a26e734f0f78306 (patch)
treefb495d8c18801f271d124ee48731f10df396ca89 /cutl/xml/value-traits.txx
parent4c8104756b92b9fa16b3a725e8a6aa620dfd606e (diff)
Get rid of legacy build systems and rename cutl/ to libcutl/
Diffstat (limited to 'cutl/xml/value-traits.txx')
-rw-r--r--cutl/xml/value-traits.txx34
1 files changed, 0 insertions, 34 deletions
diff --git a/cutl/xml/value-traits.txx b/cutl/xml/value-traits.txx
deleted file mode 100644
index 552c48b..0000000
--- a/cutl/xml/value-traits.txx
+++ /dev/null
@@ -1,34 +0,0 @@
-// file : cutl/xml/value-traits.txx
-// license : MIT; see accompanying LICENSE file
-
-#include <sstream>
-
-#include <cutl/xml/parser.hxx>
-#include <cutl/xml/serializer.hxx>
-
-namespace cutl
-{
- namespace xml
- {
- template <typename T>
- T default_value_traits<T>::
- parse (std::string s, const parser& p)
- {
- T r;
- std::istringstream is (s);
- if (!(is >> r && is.eof ()) )
- throw parsing (p, "invalid value '" + s + "'");
- return r;
- }
-
- template <typename T>
- std::string default_value_traits<T>::
- serialize (const T& v, const serializer& s)
- {
- std::ostringstream os;
- if (!(os << v))
- throw serialization (s, "invalid value");
- return os.str ();
- }
- }
-}