Generated on Tue Feb 11 2025 17:33:26 for Gecode by doxygen 1.12.0
macros.hpp File Reference

Go to the source code of this file.

Macros

#define GECODE_CAT2(R, LINE)
 Concatenate R and LINE.
 
#define GECODE_CAT(R, LINE)
 Concatenate macro-expanded R and LINE.
 
#define GECODE_FRESH(P)
 Generate fresh name with prefix P.
 
#define GECODE_NEVER   assert(false);
 Assert that this command is never executed.
 
#define GECODE_NOT_NULL(p)
 Assert that a pointer is never NULL.
 
#define GECODE_VALID_FUNCTION(f)
 Assert that a function is valid.
 
#define GECODE_ASSUME(p)
 Assert certain property.
 

Macro Definition Documentation

◆ GECODE_CAT2

#define GECODE_CAT2 ( R,
LINE )
Value:
R ## LINE

Concatenate R and LINE.

Definition at line 35 of file macros.hpp.

◆ GECODE_CAT

#define GECODE_CAT ( R,
LINE )
Value:
GECODE_CAT2(R,LINE)
#define GECODE_CAT2(R, LINE)
Concatenate R and LINE.
Definition macros.hpp:35

Concatenate macro-expanded R and LINE.

Definition at line 37 of file macros.hpp.

◆ GECODE_FRESH

#define GECODE_FRESH ( P)
Value:
GECODE_CAT(_GECODE_ ## P, __LINE__)
#define GECODE_CAT(R, LINE)
Concatenate macro-expanded R and LINE.
Definition macros.hpp:37

Generate fresh name with prefix P.

Definition at line 39 of file macros.hpp.

◆ GECODE_NEVER

#define GECODE_NEVER   assert(false);

Assert that this command is never executed.

This is preferred over assert(false) as it is used for optimization, if supported by a compiler (for example, Microsoft Visual C++).

Definition at line 56 of file macros.hpp.

◆ GECODE_NOT_NULL

#define GECODE_NOT_NULL ( p)
Value:
assert(p != NULL);
int p
Number of positive literals for node type.

Assert that a pointer is never NULL.

This is preferred over assert as it is used for optimization, if supported by a compiler (for example, Microsoft Visual C++).

Definition at line 75 of file macros.hpp.

◆ GECODE_VALID_FUNCTION

#define GECODE_VALID_FUNCTION ( f)
Value:
assert(static_cast<bool>(f));

Assert that a function is valid.

This is preferred over assert as it is used for optimization, if supported by a compiler (for example, Microsoft Visual C++).

Definition at line 94 of file macros.hpp.

◆ GECODE_ASSUME

#define GECODE_ASSUME ( p)
Value:
assert((p));

Assert certain property.

This might be used for optimization as well (for example, Microsoft Visual C++), otherwise it behaves like any assert.

Definition at line 114 of file macros.hpp.