Boost logo

Boost :

From: SourceForge.net (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:
https://sourceforge.net/tracker/?func=detail&atid=207586&aid=996331&group_id=7586

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:
https://sourceforge.net/tracker/?func=detail&atid=207586&aid=996331&group_id=7586

-------------------------------------------------------
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.
http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click
_______________________________________________
Boost-bugs mailing list
Boost-bugs_at_[hidden]
https://lists.sourceforge.net/lists/listinfo/boost-bugs


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk