diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2014-01-19 10:05:08 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2014-01-19 10:06:32 +0200 |
commit | 0fdf19714613a82a184f4f6e75fb9a4f9b62f18a (patch) | |
tree | 93bb2df0f9d9eab44d36dedf29d4df500ecefcbc /libxsd/xsd/cxx/tree/type-factory-map.hxx | |
parent | 45db924dfc19b49b7930522dbddd123fb9575e32 (diff) |
Use std::unique_ptr instead of std::auto_ptr in C++11 mode
Diffstat (limited to 'libxsd/xsd/cxx/tree/type-factory-map.hxx')
-rw-r--r-- | libxsd/xsd/cxx/tree/type-factory-map.hxx | 16 |
1 files changed, 9 insertions, 7 deletions
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 <map> #include <string> -#include <memory> // std::auto_ptr +#include <memory> // std::auto_ptr/unique_ptr #include <cstddef> // std::size_t #include <xercesc/dom/DOMElement.hpp> +#include <xsd/cxx/config.hxx> // XSD_AUTO_PTR + #include <xsd/cxx/tree/elements.hxx> #include <xsd/cxx/xml/qualified-name.hxx> @@ -26,9 +28,9 @@ namespace xsd struct type_factory_map { typedef xml::qualified_name<C> qualified_name; - typedef std::auto_ptr<type> (*factory) (const xercesc::DOMElement&, - flags, - container*); + typedef XSD_AUTO_PTR<type> (*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<type> + XSD_AUTO_PTR<type> create (const C* name, // element name const C* ns, // element namespace factory static_type, @@ -66,7 +68,7 @@ namespace xsd private: template <typename T> - static std::auto_ptr<type> + static XSD_AUTO_PTR<type> traits_adapter (const xercesc::DOMElement&, flags, container*); private: @@ -132,7 +134,7 @@ namespace xsd // // template<typename T> - std::auto_ptr<type> + XSD_AUTO_PTR<type> factory_impl (const xercesc::DOMElement&, flags, container*); // |