From 28f737a15d9ce5d9e8b06ab768ef858c07ae510e Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Tue, 5 Sep 2023 15:20:13 +0300 Subject: Make c++11 value default for xsd --std option Also add support for c++14, c++17, c++20, and c++23 values and drop passing --std option in tests and examples. --- xsd/doc/cxx/parser/guide/index.xhtml.in | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) (limited to 'xsd/doc/cxx/parser/guide/index.xhtml.in') diff --git a/xsd/doc/cxx/parser/guide/index.xhtml.in b/xsd/doc/cxx/parser/guide/index.xhtml.in index 96d06e2..119f421 100644 --- a/xsd/doc/cxx/parser/guide/index.xhtml.in +++ b/xsd/doc/cxx/parser/guide/index.xhtml.in @@ -553,7 +553,7 @@

-$ xsd cxx-parser --std c++11 --xml-parser expat hello.xsd
+$ xsd cxx-parser --xml-parser expat hello.xsd
   

The --xml-parser option indicates that we want to @@ -1494,7 +1494,7 @@ gender ::gender ::gender; option to let the XSD compiler know about our type map:

-$ xsd cxx-parser --std c++11 --type-map people.map people.xsd
+$ xsd cxx-parser --type-map people.map people.xsd
   

If we now look at the generated people-pskel.hxx, @@ -1673,10 +1673,10 @@ namespace http://www.w3.org/2001/XMLSchema QName xml_schema::qname; - base64Binary std::[auto|unique]_ptr<xml_schema::buffer> - std::[auto|unique]_ptr<xml_schema::buffer>; - hexBinary std::[auto|unique]_ptr<xml_schema::buffer> - std::[auto|unique]_ptr<xml_schema::buffer>; + base64Binary std::[unique|auto]_ptr<xml_schema::buffer> + std::[unique|auto]_ptr<xml_schema::buffer>; + hexBinary std::[unique|auto]_ptr<xml_schema::buffer> + std::[unique|auto]_ptr<xml_schema::buffer>; date xml_schema::date; dateTime xml_schema::date_time; @@ -1742,8 +1742,7 @@ people ::people; recompile our schema and move on to implementing the parsers:

-$ xsd cxx-parser --std c++11 --xml-parser expat --type-map people.map \
-      people.xsd
+$ xsd cxx-parser --xml-parser expat --type-map people.map people.xsd
   

Here is the implementation of our three parsers in full. One @@ -2608,14 +2607,14 @@ private: base64Binary base64_binary_pimpl - std::[auto|unique]_ptr< xml_schema::buffer>
+ std::[unique|auto]_ptr< xml_schema::buffer>
Section 6.3, "base64Binary and hexBinary Parsers" hexBinary hex_binary_pimpl - std::[auto|unique]_ptr< xml_schema::buffer>
+ std::[unique|auto]_ptr< xml_schema::buffer>
Section 6.3, "base64Binary and hexBinary Parsers" -- cgit v1.1