From mortimer at vollbio.de Mon Sep 24 09:29:52 2018 From: mortimer at vollbio.de (mortimer@vollbio.de) Date: Mon Sep 24 21:45:27 2018 Subject: [xsde-users] Compiling xsd/e generated code with gcc 5.4 --std=C++11 Message-ID: Hi, I'm trying to compile code that includes code generated with xsd/e 3.2.0. Everything works fine with the Visual Studio 2010 compiler but with gcc 5.4.0 on Ubuntu 16.04 LTS with --std=C++11 I get many compiler errors like /home/markus/xsde-3.2.0-i686-linux-gnu/libxsde/xsde/cxx/parser/state.hxx:22:14: note: ?xsde::cxx::parser::parser_stack::parser_stack(xsde::cxx::parser::parser_stack&&)? is implicitly deleted because the default definition would be ill-formed: struct parser_stack /home/markus/xsde-3.2.0-i686-linux-gnu/libxsde/xsde/cxx/stack.hxx:34:7: error: ?xsde::cxx::stack::stack(xsde::cxx::stack&)? is private stack (stack&); /home/markus/xsde-3.2.0-i686-linux-gnu/libxsde/xsde/cxx/parser/state.hxx:22:14: error: invalid initialization of non-const reference of type ?xsde::cxx::stack&? from an rvalue of type ?xsde::cxx::stack? The call of the code generator looks like this: xsde cxx-hybrid --generate-polymorphic --generate-parser --generate-aggregate Is there a chance to solve this anyhow? I can't omit the C++11 option because the user code using the generated code already contains C++11 language features as far as the Visual Studio compiler supports them. Thank you very much in advance, Markus From boris at codesynthesis.com Mon Sep 24 23:33:14 2018 From: boris at codesynthesis.com (Boris Kolpackov) Date: Mon Sep 24 23:41:03 2018 Subject: [xsde-users] Compiling xsd/e generated code with gcc 5.4 --std=C++11 In-Reply-To: References: Message-ID: mortimer@vollbio.de writes: > /home/markus/xsde-3.2.0-i686-linux-gnu/libxsde/xsde/cxx/parser/state.hxx:22:14: > note: ?xsde::cxx::parser::parser_stack::parser_stack(xsde::cxx::parser::parser_stack&&)? > is implicitly deleted because the default definition would be ill-formed: > struct parser_stack > > /home/markus/xsde-3.2.0-i686-linux-gnu/libxsde/xsde/cxx/stack.hxx:34:7: > error: ?xsde::cxx::stack::stack(xsde::cxx::stack&)? is private > stack (stack&); > > /home/markus/xsde-3.2.0-i686-linux-gnu/libxsde/xsde/cxx/parser/state.hxx:22:14: > error: invalid initialization of non-const reference of type > ?xsde::cxx::stack&? from an rvalue of type ?xsde::cxx::stack? This is strange. Is there more context to this error? That is, where was this definition needed? Also, if you are interested, you can try the latest available pre-release: https://codesynthesis.com/~boris/tmp/xsde/