Changeset a0bd9a2 for libcfa/src


Ignore:
Timestamp:
Jun 15, 2023, 11:38:41 AM (12 months ago)
Author:
Andrew Beach <ajbeach@…>
Branches:
master
Children:
e172f42
Parents:
60f4919
Message:

Lifted _Ostream_Flags out of _Ostream_Manip, so the bitfields do not exist in the polymorphic structure.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/iostream.hfa

    r60f4919 ra0bd9a2  
    5151        int fmt( ostype &, const char format[], ... ) __attribute__(( format(printf, 2, 3) ));
    5252}; // basic_ostream
    53        
     53
    5454forall( ostype & | basic_ostream( ostype ) )
    5555trait ostream {
     
    161161// *********************************** manipulators ***********************************
    162162
     163struct _Ostream_Flags {
     164        unsigned char eng:1;                                            // engineering notation
     165        unsigned char neg:1;                                            // val is negative
     166        unsigned char pc:1;                                                     // precision specified
     167        unsigned char left:1;                                           // left justify
     168        unsigned char nobsdp:1;                                         // base prefix / decimal point
     169        unsigned char sign:1;                                           // plus / minus sign
     170        unsigned char pad0:1;                                           // zero pad
     171};
     172
    163173forall( T )
    164174struct _Ostream_Manip {
     
    168178        union {
    169179                unsigned char all;
    170                 struct {
    171                         unsigned char eng:1;                                            // engineering notation
    172                         unsigned char neg:1;                                            // val is negative
    173                         unsigned char pc:1;                                                     // precision specified
    174                         unsigned char left:1;                                           // left justify
    175                         unsigned char nobsdp:1;                                         // base prefix / decimal point
    176                         unsigned char sign:1;                                           // plus / minus sign
    177                         unsigned char pad0:1;                                           // zero pad
    178                 } flags;
     180                _Ostream_Flags flags;
    179181        };
    180182}; // _Ostream_Manip
Note: See TracChangeset for help on using the changeset viewer.