The scope and visibility rules are the same as for other operators. This is specially useful if the native implementation of some basic operation is poor, or if you want some extraneous check. The implementation is free to warn the user that using this feature may have an impact on code efficiency. Users should use inline functions to avoid impacting the generated code efficiency too much. You can change operator precedence when defining an operator, by putting the new precedence into , following the parameters definition.
Precedences have the same range as unsigned int, and are implementation dependent.
It would be wise, however, if they were contiguous from 0 to as much as necessary. If the implementation does not allow unsigned int to cover the whole range of necessary precedences, unsigned long can be allowed instead. If it is not sufficient, unsigned double can be used instead. Notice that an implementation is required to have unigned long wide enough to store at least 0 and 1. An implementation is allowed to reject precedence expressions that are not obviously constant or that can lead to ambiguities.