Im­prove this page Quickly fork, edit on­line, and sub­mit a pull re­quest for this page. Re­quires a signed-in GitHub ac­count. This works well for small changes. If you'd like to make larger changes you may want to con­sider using local clone. Page wiki View or edit the com­mu­nity-main­tained wiki page as­so­ci­ated with this page.

std.​system

Jump to: OS win32 win64 linux osx freeBSD solaris otherPosix os Endian bigEndian littleEndian endian

In­for­ma­tion about the tar­get op­er­at­ing sys­tem, en­vi­ron­ment, and CPU.

Li­cense:
Boost Li­cense 1.0.

Au­thors:
Wal­ter Bright and Jonathan M Davis

Source:
std/sys­tem.d

enum OS;
Op­er­at­ing sys­tem.

Note:
This is for cases where you need a value rep­re­sent­ing the OS at run­time. If you're doing some­thing which should com­pile dif­fer­ently on dif­fer­ent OSes, then please use ver­sion(Win­dows), ver­sion(linux), etc.

See Also:
Pre­de­fined Ver­sions

win32
Mi­crosoft 32 bit Win­dows sys­tems

win64
Mi­crosoft 64 bit Win­dows sys­tems

linux
All Linux Sys­tems

osx
Mac OS X

freeBSD
FreeBSD

so­laris
So­laris

oth­er­Posix
Other Posix Sys­tems

im­mutable OS os;
The OS that the pro­gram was com­piled for.

enum En­dian;
Byte order en­di­an­ness.

Note:
This is in­tended for cases where you need to deal with en­di­an­ness at run­time. If you're doing some­thing which should com­pile dif­fer­ently de­pend­ing on whether you're com­pil­ing on a big en­dian or lit­tle en­dian ma­chine, then please use ver­sion(Bi­gEn­dian) and ver­sion(Lit­tleEn­dian).

See Also:
Pre­de­fined Ver­sions

bi­gEn­dian
Big en­dian byte order

lit­tleEn­dian
Lit­tle en­dian byte order

im­mutable En­dian en­dian;
The en­di­an­ness that the pro­gram was com­piled for.