diff options
Diffstat (limited to 'libxsd/xsd/cxx/tree/std-ostream-map.txx')
-rw-r--r-- | libxsd/xsd/cxx/tree/std-ostream-map.txx | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/libxsd/xsd/cxx/tree/std-ostream-map.txx b/libxsd/xsd/cxx/tree/std-ostream-map.txx index c1187ef..ee46f16 100644 --- a/libxsd/xsd/cxx/tree/std-ostream-map.txx +++ b/libxsd/xsd/cxx/tree/std-ostream-map.txx @@ -219,6 +219,13 @@ namespace xsd template <typename C> void std_ostream_map<C>:: + unregister_type (const type_id& tid) + { + type_map_.erase (&tid); + } + + template <typename C> + void std_ostream_map<C>:: insert (std::ostream& os, const type& x) { if (inserter i = find (typeid (x))) @@ -274,6 +281,13 @@ namespace xsd std_ostream_map_instance<id, C> ().register_type ( typeid (T), &inserter_impl<T>); } + + template<unsigned long id, typename C, typename T> + std_ostream_initializer<id, C, T>:: + ~std_ostream_initializer () + { + std_ostream_map_instance<id, C> ().unregister_type (typeid (T)); + } } } } |