Generated on Sat Feb 7 2015 02:01:34 for Gecode by doxygen 1.8.9.1
macros.hpp File Reference

(Revision: 8082)

Go to the source code of this file.

Macros

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

Macro Definition Documentation

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

Concatenate R and LINE.

Definition at line 39 of file macros.hpp.

#define GECODE_CAT (   R,
  LINE 
)    GECODE_CAT2(R,LINE)

Concatenate macro-expanded R and LINE.

Definition at line 41 of file macros.hpp.

#define GECODE_FRESH (   P)    GECODE_CAT(_GECODE_ ## P, __LINE__)

Generate fresh name with prefix P.

Definition at line 43 of file macros.hpp.

#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 60 of file macros.hpp.

#define GECODE_NOT_NULL (   p)    assert(p != NULL);

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 79 of file macros.hpp.

#define GECODE_ASSUME (   p)    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 99 of file macros.hpp.