namespace std

namespace std {

// typedefs

typedef size_t HashFunc(variant_t key);

typedef bool IsEqualFunc(
    variant_t key1,
    variant_t key2
);

typedef bool LessFunc(
    variant_t e1,
    variant_t e2
);

typedef int CmpFunc(
    variant_t key1,
    variant_t key2
);

// enums

bitflag enum GuidStringFlags;

// structs

struct Error;
struct Guid;
struct ListEntry;
struct MapEntry;

// classes

class Array;
class Buffer;
class HashTable;
class List;
class RbTree;
class StringBuilder;
class StringHashTable;
class StringHashTableIgnoreCase;

// global variables

std.Guid g_errnoGuid = { 0x25a6a7b5, 0xf662, 0x48ae, { 0xbc, 0xb6, 0x9a, 0x5c, 0xb5, 0xce, 0x5b, 0xb9 } };
std.Guid g_winErrorGuid = { 0x54e100e8, 0x2137, 0x40b8, { 0xbc, 0xd8, 0x00, 0xac, 0x1d, 0x0b, 0xaa, 0x16 } };
std.Guid g_ntStatusGuid = { 0x81443347, 0x3bc9, 0x4d5e, { 0x8b, 0x23, 0x32, 0xd7, 0x80, 0xed, 0xb5, 0x2b } };

// global functions

string_t cdecl format(
    string_t fmtSpecifier,
    ...
);

void sort(
    variant_t* p,
    size_t count
);

void sort(
    variant_t* p,
    size_t count,
    std.LessFunc* lessFunc
);

std.Error const* getLastError();
string_t getLastErrorDescription();
void setError(std.Error const* error);
void setErrno(int errno);
void setError(string_t string);

} // namespace std