Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 13 additions & 22 deletions stl/inc/xiosbase
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ _STD_BEGIN
template <class _Dummy>
class _Iosb { // define templatized bitmask/enumerated types, instantiate on demand
public:
enum _Dummy_enum { _Dummy_enum_val = 1 }; // don't ask, TRANSITION, ABI
enum _Fmtflags { // constants for formatting options
_Fmtmask = 0xffff,
_Fmtzero = 0
Expand All @@ -46,10 +45,9 @@ public:
static constexpr int hexfloat = 0x3000; // TRANSITION, ABI, GH-3296

static constexpr int boolalpha = 0x4000;
static constexpr int _Stdio = 0x8000;
static constexpr int adjustfield = 0x01C0; // left | right | internal
static constexpr int basefield = 0x0E00; // dec | oct | hex
static constexpr int floatfield = 0x3000; // scientific | fixed
static constexpr int adjustfield = left | right | internal;
static constexpr int basefield = dec | oct | hex;
static constexpr int floatfield = scientific | fixed;

enum _Iostate { // constants for stream states
_Statmask = 0x17
Expand All @@ -60,10 +58,6 @@ public:
static constexpr int failbit = 0x2;
static constexpr int badbit = 0x4;

enum _Openmode { // constants for file opening options
_Openmask = 0xff
};

static constexpr int in = 0x01;
static constexpr int out = 0x02;
static constexpr int ate = 0x04;
Expand All @@ -76,21 +70,18 @@ public:
static constexpr int noreplace = _Noreplace;
#endif

enum _Seekdir { // constants for file positioning options
_Seekbeg,
_Seekcur,
_Seekend
};

static constexpr int beg = _Seekbeg;
static constexpr int cur = _Seekcur;
static constexpr int end = _Seekend;

enum { // TRANSITION, ABI
_Openprot = _SH_DENYNO
};
static constexpr int beg = 0;
static constexpr int cur = 1;
static constexpr int end = 2;

static constexpr int _Default_open_prot = _SH_DENYNO; // constant for default file opening protection

// TRANSITION, ABI: These enums don't appear in the STL DLL's export surface, but MaxMPDCompat
// in the MSVC-internal build detects that they appear in the CompatibilityData baseline.
enum _Dummy_enum { _Dummy_enum_val = 1 };
enum _Openmode { _Openmask = 0xff };
enum _Seekdir { _Seekbeg, _Seekcur, _Seekend };
enum { _Openprot = _SH_DENYNO };
};

_EXPORT_STD extern "C++" class _CRTIMP2_PURE_IMPORT ios_base : public _Iosb<int> { // base class for ios
Expand Down
38 changes: 10 additions & 28 deletions stl/inc/xlocale
Original file line number Diff line number Diff line change
Expand Up @@ -23,34 +23,7 @@ _STL_DISABLE_CLANG_WARNINGS

_STD_BEGIN
template <class _Dummy>
class _Locbase { // define templatized category constants, instantiate on demand
public:
_PGLOBAL static const int collate = _M_COLLATE;
_PGLOBAL static const int ctype = _M_CTYPE;
_PGLOBAL static const int monetary = _M_MONETARY;
_PGLOBAL static const int numeric = _M_NUMERIC;
_PGLOBAL static const int time = _M_TIME;
_PGLOBAL static const int messages = _M_MESSAGES;
_PGLOBAL static const int all = _M_ALL;
_PGLOBAL static const int none = 0;
};

template <class _Dummy>
const int _Locbase<_Dummy>::collate;
template <class _Dummy>
const int _Locbase<_Dummy>::ctype;
template <class _Dummy>
const int _Locbase<_Dummy>::monetary;
template <class _Dummy>
const int _Locbase<_Dummy>::numeric;
template <class _Dummy>
const int _Locbase<_Dummy>::time;
template <class _Dummy>
const int _Locbase<_Dummy>::messages;
template <class _Dummy>
const int _Locbase<_Dummy>::all;
template <class _Dummy>
const int _Locbase<_Dummy>::none;
class _Locbase {}; // TRANSITION, ABI, affects sizeof(locale)

_EXPORT_STD template <class _Elem>
class collate;
Expand Down Expand Up @@ -90,6 +63,15 @@ _EXPORT_STD extern "C++" class locale : public _Locbase<int>, public _Crt_new_de
public:
using category = int;

static constexpr category collate = _M_COLLATE;
static constexpr category ctype = _M_CTYPE;
static constexpr category monetary = _M_MONETARY;
static constexpr category numeric = _M_NUMERIC;
static constexpr category time = _M_TIME;
static constexpr category messages = _M_MESSAGES;
static constexpr category all = _M_ALL;
static constexpr category none = 0;

class _CRTIMP2_PURE_IMPORT id { // identifier stamp, unique for each distinct kind of facet
public:
__CLR_OR_THIS_CALL id(size_t _Val = 0) : _Id(_Val) {}
Expand Down