Changeset 209:768b76c5c087 in rrlib_serialization


Ignore:
Timestamp:
02.11.2021 15:58:04 (2 years ago)
Author:
Max Reichardt <max.reichardt@…>
Branch:
17.03
Phase:
public
Tags:
tip
Message:

Makes rrlib_serialization compile without rrlib_xml

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • detail/tStringOutputStreamFallback.cpp

    r206 r209  
    7272// tStringOutputStreamFallback destructor 
    7373//---------------------------------------------------------------------- 
     74#ifdef _LIB_RRLIB_XML_PRESENT_ 
    7475tStringOutputStreamFallback::~tStringOutputStreamFallback() 
    7576{ 
    7677  wrapped.SetContent(ToString()); 
    7778} 
     79#endif 
    7880 
    7981//---------------------------------------------------------------------- 
  • tests/serialization.cpp

    r192 r209  
    7777// Const values 
    7878//---------------------------------------------------------------------- 
     79 
     80#ifdef _LIB_RRLIB_XML_PRESENT_ 
     81const bool cXML_SUPPORT = true; 
     82#else 
     83const bool cXML_SUPPORT = false; 
     84#endif 
    7985 
    8086//---------------------------------------------------------------------- 
     
    97103static_assert(ContainerSerialization<std::pair<size_t, std::string>>::cBINARY_SERIALIZABLE, "Incorrect trait implementation"); 
    98104static_assert(IsBinarySerializable<std::map<size_t, std::string>>::value == true, "Incorrect trait implementation"); 
    99 static_assert(IsXMLSerializable<std::map<size_t, std::string>>::value == true, "Incorrect trait implementation"); 
     105static_assert(IsXMLSerializable<std::map<size_t, std::string>>::value == cXML_SUPPORT, "Incorrect trait implementation"); 
    100106static_assert(IsAssociativeContainer<std::vector<std::string>>::value == false, "Incorrect trait implementation"); 
    101107static_assert(IsAssociativeContainer<std::vector<double>>::value == false, "Incorrect trait implementation"); 
     
    123129static_assert(IsBinarySerializable<std::tuple<int&, std::string&>>::value == true, "Incorrect trait implementation"); 
    124130 
    125 static_assert(IsXMLSerializable<std::tuple<>>::value == true, "Incorrect trait implementation"); 
    126 static_assert(IsXMLSerializable<std::tuple<int, std::array<std::string, 4>, std::vector<tEnumSigned>>>::value == true, "Incorrect trait implementation"); 
     131static_assert(IsXMLSerializable<std::tuple<>>::value == cXML_SUPPORT, "Incorrect trait implementation"); 
     132static_assert(IsXMLSerializable<std::tuple<int, std::array<std::string, 4>, std::vector<tEnumSigned>>>::value == cXML_SUPPORT, "Incorrect trait implementation"); 
    127133static_assert(IsXMLSerializable<std::tuple<tNonSerializable, std::array<tNonSerializable, 4>>>::value == false, "Incorrect trait implementation"); 
    128 static_assert(IsXMLSerializable<std::tuple<std::map<int, int>, std::array<std::string, 4>>>::value == true, "Incorrect trait implementation"); 
    129 static_assert(IsXMLSerializable<std::pair<int, std::array<std::string, 4>>>::value == true, "Incorrect trait implementation"); 
     134static_assert(IsXMLSerializable<std::tuple<std::map<int, int>, std::array<std::string, 4>>>::value == cXML_SUPPORT, "Incorrect trait implementation"); 
     135static_assert(IsXMLSerializable<std::pair<int, std::array<std::string, 4>>>::value == cXML_SUPPORT, "Incorrect trait implementation"); 
    130136static_assert(IsXMLSerializable<std::pair<tNonSerializable, std::array<tNonSerializable, 4>>>::value == false, "Incorrect trait implementation"); 
    131 static_assert(IsXMLSerializable<int&>::value == true, "Incorrect trait implementation"); 
    132 static_assert(IsXMLSerializable<std::tuple<int&, std::string&>>::value == true, "Incorrect trait implementation"); 
     137static_assert(IsXMLSerializable<int&>::value == cXML_SUPPORT, "Incorrect trait implementation"); 
     138static_assert(IsXMLSerializable<std::tuple<int&, std::string&>>::value == cXML_SUPPORT, "Incorrect trait implementation"); 
    133139 
    134140 
Note: See TracChangeset for help on using the changeset viewer.