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/parser/validating/xml-schema-pimpl.txx | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'libxsd/xsd/cxx/parser/validating/xml-schema-pimpl.txx') diff --git a/libxsd/xsd/cxx/parser/validating/xml-schema-pimpl.txx b/libxsd/xsd/cxx/parser/validating/xml-schema-pimpl.txx index 021cca8..6631dd2 100644 --- a/libxsd/xsd/cxx/parser/validating/xml-schema-pimpl.txx +++ b/libxsd/xsd/cxx/parser/validating/xml-schema-pimpl.txx @@ -6,6 +6,10 @@ #include #include +#ifdef XSD_CXX11 +# include // std::move +#endif + #include #include @@ -1634,10 +1638,14 @@ namespace xsd } template - std::auto_ptr base64_binary_pimpl:: + XSD_AUTO_PTR base64_binary_pimpl:: post_base64_binary () { +#ifdef XSD_CXX11 + return std::move (buf_); +#else return buf_; +#endif } // hex_binary @@ -1721,10 +1729,14 @@ namespace xsd } template - std::auto_ptr hex_binary_pimpl:: + XSD_AUTO_PTR hex_binary_pimpl:: post_hex_binary () { +#ifdef XSD_CXX11 + return std::move (buf_); +#else return buf_; +#endif } // time_zone -- cgit v1.1