summaryrefslogtreecommitdiff
path: root/xsd/cxx/tree/fundamental-header.hxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2014-01-19 10:05:08 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2014-01-19 10:06:32 +0200
commit0fdf19714613a82a184f4f6e75fb9a4f9b62f18a (patch)
tree93bb2df0f9d9eab44d36dedf29d4df500ecefcbc /xsd/cxx/tree/fundamental-header.hxx
parent45db924dfc19b49b7930522dbddd123fb9575e32 (diff)
Use std::unique_ptr instead of std::auto_ptr in C++11 mode
Diffstat (limited to 'xsd/cxx/tree/fundamental-header.hxx')
-rw-r--r--xsd/cxx/tree/fundamental-header.hxx11
1 files changed, 8 insertions, 3 deletions
diff --git a/xsd/cxx/tree/fundamental-header.hxx b/xsd/cxx/tree/fundamental-header.hxx
index 2171de4..18a5e61 100644
--- a/xsd/cxx/tree/fundamental-header.hxx
+++ b/xsd/cxx/tree/fundamental-header.hxx
@@ -1146,7 +1146,8 @@ namespace CXX
<< "{";
// @@ Disregarding current naming convention by using the
- // fixed name (no template typedef).
+ // fixed name (even in C++11, template alias is not yet
+ // widely supported).
//
if (doxygen)
os << "/**" << endl
@@ -1156,8 +1157,12 @@ namespace CXX
os << "// Automatic pointer for DOMDocument." << endl
<< "//" << endl;
- os << "using ::xsd::cxx::xml::dom::auto_ptr;"
- << endl;
+ if (std >= cxx_version::cxx11)
+ os << "using ::xsd::cxx::xml::dom::unique_ptr;";
+ else
+ os << "using ::xsd::cxx::xml::dom::auto_ptr;";
+
+ os << endl;
if (parsing)
{