### #pragma priority (C++)

The #pragma priority directive specifies the order in which static objects are to be initialized at run time.

    >>--#--pragma--priority--(--n--)--><

Where n is an integer literal in the range of INT_MIN to INT _MAX. The default value is 0. A negative value indicates a higher priority; a positive value indicates a lower priority.

The first 1024 priorities (INT_MIN to INT_MIN + 1023) are reserved for use by the compiler and its libraries. The priority value specified applies to all runtime static initialization in the current compilation unit.

Any global object declared before another object in a file is constructed first. Use #pragma priority to specify the construction order of objects across files.

To ensure that the objects are always constructed from top to bottom in a file, the compiler enforces the restriction that the priority specified all objects before and all objects after it until the next #pragma is at that priority.

- Pragma Directives (#pragma)
- Preprocessor Directives