-
Notifications
You must be signed in to change notification settings - Fork 1
LangSpecs Macros
Neuron Teckid edited this page Dec 28, 2017
·
4 revisions
There are some macros that serve as compile-time constant during the compilation.
-
__file__
: the file name string if the input file is specified by-i
option orinclude
d by other files, ornull
if read from stdin -
__line__
: the line number integer -
__debug__
: the debug level integer set by-D
option; by default it is 0 -
__func__
: the context function name string -
__class__
: the context class name string -
__class_func__
: equivalent to__class__ + '.' + __func__
Since those are compile-time constant you could make use of them for compile-time constant folding.