Skip to content

Generates bad constructor declaration for local types #9

Description

@GoogleCodeExporter
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 harvey.s...@nerd1951.com on 14 May 2014 at 4:04

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions