From 0fdf19714613a82a184f4f6e75fb9a4f9b62f18a Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Sun, 19 Jan 2014 10:05:08 +0200 Subject: Use std::unique_ptr instead of std::auto_ptr in C++11 mode --- libxsd/xsd/cxx/tree/type-factory-map.hxx | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'libxsd/xsd/cxx/tree/type-factory-map.hxx') diff --git a/libxsd/xsd/cxx/tree/type-factory-map.hxx b/libxsd/xsd/cxx/tree/type-factory-map.hxx index a42ef96..ea173cc 100644 --- a/libxsd/xsd/cxx/tree/type-factory-map.hxx +++ b/libxsd/xsd/cxx/tree/type-factory-map.hxx @@ -8,11 +8,13 @@ #include #include -#include // std::auto_ptr +#include // std::auto_ptr/unique_ptr #include // std::size_t #include +#include // XSD_AUTO_PTR + #include #include @@ -26,9 +28,9 @@ namespace xsd struct type_factory_map { typedef xml::qualified_name qualified_name; - typedef std::auto_ptr (*factory) (const xercesc::DOMElement&, - flags, - container*); + typedef XSD_AUTO_PTR (*factory) (const xercesc::DOMElement&, + flags, + container*); public: type_factory_map (); @@ -49,7 +51,7 @@ namespace xsd unregister_element (const qualified_name& root, const qualified_name& subst); - std::auto_ptr + XSD_AUTO_PTR create (const C* name, // element name const C* ns, // element namespace factory static_type, @@ -66,7 +68,7 @@ namespace xsd private: template - static std::auto_ptr + static XSD_AUTO_PTR traits_adapter (const xercesc::DOMElement&, flags, container*); private: @@ -132,7 +134,7 @@ namespace xsd // // template - std::auto_ptr + XSD_AUTO_PTR factory_impl (const xercesc::DOMElement&, flags, container*); // -- cgit v1.1