omni::application::bit_width
NAME

omni::application::bit_width

A function of omni::application

#include <omni/application.hpp>
inline uint32_t omni::application::bit_width()

SYNOPSIS

Gets the current applications bit width (i.e. 32/64-bit)

top

DESCRIPTION

Gets the current application context bit width by retrieving the size of a pointer and multiplying by CHAR_BIT; returns the following code (sizeof(char*) * CHAR_BIT). This does not affirm if a processor type is a specific bit width, e.g. a 32-bit application calling this function would return 32 even if run on a 64-bit machine.

top

RETURN VALUES

An unsigned integer value of the current bit width.

top


EXAMPLE

#include <omni/application>

int main(int argc, char** argv)
{
    std::cout << "Application bit-size: " << omni::application::bit_width() << std::endl;
    return 0;
}
Visit the examples page for more.

top