lmi-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi-commits] [lmi] master 2871361: Allow XML serialization of enum type


From: Greg Chicares
Subject: [lmi-commits] [lmi] master 2871361: Allow XML serialization of enum types
Date: Thu, 5 Nov 2020 11:23:08 -0500 (EST)

branch: master
commit 28713612c66d9563745df486a48eb6bfd687e669
Author: Gregory W. Chicares <gchicares@sbcglobal.net>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>

    Allow XML serialization of enum types
    
    For lmi's enumerative types that are wrapped in an mc_enum<enum_type>
    class template, it is probably preferable to serialize the class type
    rather than the underlying enum. But that's not a strong enough reason
    to forbid serialization of all enum types.
---
 xml_serialize.hpp | 2 --
 1 file changed, 2 deletions(-)

diff --git a/xml_serialize.hpp b/xml_serialize.hpp
index 16ad31e..7bfe608 100644
--- a/xml_serialize.hpp
+++ b/xml_serialize.hpp
@@ -60,8 +60,6 @@ namespace xml_serialize
 template<typename T>
 struct xml_io
 {
-    static_assert(!std::is_enum_v<T>); // Prefer mc_enum.
-
     static void to_xml(xml::element& e, T const& t)
     {
         e.set_text_content(value_cast<std::string>(t).c_str());



reply via email to

[Prev in Thread] Current Thread [Next in Thread]