Skip to content
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 or included by other files, or null 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.

Clone this wiki locally