Clingo
Loading...
Searching...
No Matches
Helpers for enumurations

Currently, just provides a macro to create bitsets. More...

Macros

#define CLINGO_ENABLE_BITSET_ENUM(E, ...)
 Opt-in macro for enabling bit operations for a given enum type.
 
#define CLINGO_ENUM_OP(op, arg, ...)   [[maybe_unused]] inline __VA_ARGS__ constexpr auto operator op arg noexcept
 Internal helper.
 

Detailed Description

Currently, just provides a macro to create bitsets.

Macro Definition Documentation

◆ CLINGO_ENABLE_BITSET_ENUM

#define CLINGO_ENABLE_BITSET_ENUM (   E,
  ... 
)

Opt-in macro for enabling bit operations for a given enum type.

Use CLINGO_ENABLE_BITSET_ENUM(E) to enable bitwise operators on the underlying type of enum E.

Note
If E is a class-local enum, CLINGO_ENABLE_BITSET_ENUM(E, friend) can be used to enable bitwise operators from within the class definition.