Boost logo

Boost :

From: (noreply_at_[hidden])
Date: 2004-07-22 23:13:06

Support Requests item #996331, was opened at 2004-07-22 21:13
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:

Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Nobody/Anonymous (nobody)
Summary: with constructor not allowed in union

Initial Comment:
I get error - with '..' constructor not allowed in
union, when I compile the following code in gcc. Any
method for overcoming this kind of problem.

The code is like this.

 Struct X {
     union ut1 {
        struct st1 {
            int i1;
            long l1;
        } s1;
        struct st2 {
            char c1;
            double d1;
        } s2;
        X() {} // g++ gives error if
constructor is present.
Struct Y {
     int i;
     union ut3 {
         X x; // member 'X Y::ut3::x' with constructor
                  // not allowed in union.
         int i1;
     } u3;
     Y () { i = 0; }
int main()
    Y y;


You can respond by visiting:

This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
Boost-bugs mailing list

Boost list run by bdawes at, gregod at, cpdaniel at, john at