STXXL  1.4-dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Miscellaneous Macros

STXXL_BEGIN_NAMESPACE

A long, long time ago, not all compilers supported C++ namespaces, thus STXXL uses the macros STXXL_BEGIN_NAMESPACE and STXXL_END_NAMESPACE, which open and close the "namespace stxxl".

STXXL_UNUSED

STXXL_UNUSED is not actually a macro. It is a remedy against "unused variable" warnings, for whatever reason. Usage:

void function(int x)
{
}

LIKELY and UNLIKEY

Some compilers have facilities to specify whether a condition is likely or unlikely to be true. This may have consequences on how to layout the assembler code better.

if (LIKELY(x > 1)) { ... }
if (UNLIKELY(x > 8)) { ... }

Deprecated Functions

Some compilers can warn the user about deprecated function by tagging them in the source. In STXXL we use the macro STXXL_DEPRECATED(...) to enclose deprecated functions.