dune-common  2.11
Macros
forceinline.hh File Reference

Provide the macro DUNE_FORCE_INLINE that expands to attribute always_inline or similar depending on the compiler (version). More...

Go to the source code of this file.

Macros

#define DUNE_FORCE_INLINE   inline
 

Detailed Description

Provide the macro DUNE_FORCE_INLINE that expands to attribute always_inline or similar depending on the compiler (version).

Some information is extracted from https://meghprkh.github.io/blog/posts/c++-force-inline.

The effect of DUNE_FORCE_INLINE is typically as follows:

Even when marked with DUNE_FORCE_INLINE, the compiler cannot always inline a function. Examples for such exceptions are

Example:

DUNE_FORCE_INLINE int maxInt (int a, int b) { return a < b ? b : a; }

Macro Definition Documentation

◆ DUNE_FORCE_INLINE

#define DUNE_FORCE_INLINE   inline