Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generates bad constructor declaration for local types #9

Open
GoogleCodeExporter opened this issue Oct 27, 2015 · 0 comments
Open

Generates bad constructor declaration for local types #9

GoogleCodeExporter opened this issue Oct 27, 2015 · 0 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. Generate C++ code for examples/ipo
2. Build examples/ipo/ipo

What is the expected output? What do you see instead?
Expected a clean compile

Actual result:
Construtors for local complex types is declared incorrectly. In the example 
code, the constructor for item is defined in the header file with an empty 
function body:
item(ElementCreateArgs args){};

This should be a declaration:
item(ElementCreateArgs args);

Compile error:
IPO/Types/Items.cpp:189:3: error: redefinition of 
'IPO::Types::Items::item::item(XMLSchema::Types::ElementCreateArgs)'
   Items::item::item(ElementCreateArgs args):
   ^
In file included from IPO/Types/Items.cpp:7:0:
../include/IPO/Types/Items.h:161:5: error: 
'IPO::Types::Items::item::item(XMLSchema::Types::ElementCreateArgs)' previously 
defined here
     item(ElementCreateArgs args){};
     ^
What version of the product are you using? On what operating system?

xsd2cpp Version: 0.2.1 (Subversion trunk)
OS: Ubuntu 14.04
Compiler: g++ (Ubuntu 4.8.2-19ubuntu1) 4.8.2

Please provide any additional information below.
I first discovered this bug working with my own xml schema then found the same 
problem in this example.

Original issue reported on code.google.com by [email protected] on 14 May 2014 at 4:04

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant