xapian-core  1.4.27
Macros
attributes.h File Reference

Compiler attribute macros. More...

+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define XAPIAN_NOEXCEPT
 
#define XAPIAN_CONST_FUNCTION
 A function which does not examine any values except its arguments and has no effects except its return value. More...
 
#define XAPIAN_PURE_FUNCTION
 Like XAPIAN_CONST_FUNCTION, but such a function can also examine global memory, perhaps via pointer or reference parameters. More...
 

Detailed Description

Compiler attribute macros.

Definition in file attributes.h.

Macro Definition Documentation

◆ XAPIAN_CONST_FUNCTION

#define XAPIAN_CONST_FUNCTION

A function which does not examine any values except its arguments and has no effects except its return value.

This means the compiler can perform CSE (common subexpression elimination) on calls to such a function with the same arguments, and also completely eliminate calls to this function when the return value isn't used.

Definition at line 62 of file attributes.h.

Referenced by Xapian::miles_to_metres().

◆ XAPIAN_NOEXCEPT

#define XAPIAN_NOEXCEPT

◆ XAPIAN_PURE_FUNCTION

#define XAPIAN_PURE_FUNCTION