--- libxsd-frontend/types.hxx.orig 2022-08-19 06:30:48 UTC +++ libxsd-frontend/types.hxx @@ -13,38 +13,13 @@ namespace XSDFrontend { using std::size_t; - namespace Bits - { - struct None {}; - - template - struct NarrowerChar - { - typedef None Type; - }; - - template <> - struct NarrowerChar - { - typedef char Type; - }; - } - struct LIBXSD_FRONTEND_SYMEXPORT NonRepresentable: std::exception { virtual char const* what () const throw (); }; - template ::Type> - class StringTemplate; - - template <> - class StringTemplate - { - }; - - template + template class StringTemplate : public std::basic_string { typedef std::basic_string Base; @@ -114,16 +89,19 @@ namespace XSDFrontend // Conversion from the Narrower type. Experimental. // + template>> StringTemplate (NC const* s) { from_narrow (s); } + template>> StringTemplate (StringTemplate const& other) { from_narrow (other.c_str ()); } + template>> StringTemplate (NarrowerBase const& other) { from_narrow (other.c_str ());