title: icu::UnicodeString with boost serialize
body: <p>I am trying to serialize an icu::UnicodeString with the boost serialization library but am having trouble.</p>
  
  <p>The icu::UnicodeString does not have the required serialize function to serialize it. So I tried to create it, but I am not sure how to make these. Example code:</p>
  
  <pre><code>#include &lt;map&gt;
  #include &lt;sstream&gt;
  #include &lt;fstream&gt;
  #include &lt;unicode/unistr.h&gt;
  #include &lt;unicode/ustream.h&gt;
  
  #include &lt;boost/serialization/map.hpp&gt;
  #include &lt;boost/archive/text_iarchive.hpp&gt;
  #include &lt;boost/archive/text_oarchive.hpp&gt;
  
  namespace boost {
  namespace serialization {
  
  template&lt;class Archive&gt;
  inline void save(
      Archive &amp; ar,
      const icu_55::UnicodeString&amp; str,
      const unsigned int /* file_version */
  ){
  }
  
  template&lt;class Archive&gt;
  inline void load(
      Archive &amp; ar,
      icu_55::UnicodeString&amp; str,
      const unsigned int /* file_version */
  ){
  }
  
  // split non-intrusive serialization function member into separate
  // non intrusive save/load member functions
  template&lt;class Archive&gt;
  inline void serialize(
      Archive &amp; ar,
      icu_55::UnicodeString&amp; str,
      const unsigned int file_version
  ){
      boost::serialization::split_free(ar, str, file_version);
  }
  
  } // serialization
  } // namespace boost
  
  int main()
  {
  
     std::map&lt;icu::UnicodeString, int&gt; map = {{"asssdasd",2}, {"qwe",1}, {"Zxc",55}};
     std::stringstream ss;
     boost::archive::text_oarchive oarch(ss);
     oarch &lt;&lt; map;
     std::map&lt;icu::UnicodeString, int&gt; new_map;
     boost::archive::text_iarchive iarch(ss);
     iarch &gt;&gt; new_map;
  
     std::cout &lt;&lt; (map == new_map) &lt;&lt; std::endl;
  }
  </code></pre>
  
  <p>Compile with something like <code>g++ -o new new.cpp -std=c++11 -lboost_serialization -licuuc</code></p>
  
  <p>Currently the "save" and "load" functions are not implemented. I tried doing just the <code>ar &amp; str;</code> statements that are used in the boost manuals, but I am getting a segmentation fault with that that I am also unable to fix.</p>