L4Re Operating System Framework
Interface and Usage Documentation
Loading...
Searching...
No Matches
types File Reference
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

class  L4::Types::Flags< BITS_ENUM, UNDERLYING >
 Template for defining typical Flags bitmaps. More...
 
struct  L4::Types::Int_for_type< T >
 Metafunction to get an integral type of the same size as T. More...
 
struct  L4::Types::Flags_ops_t< DT >
 Mixin class to define a set of friend bitwise operators on DT. More...
 
struct  L4::Types::Flags_t< DT, T >
 Template type to define a flags type with bitwise operations. More...
 
struct  L4::Types::Bool< V >
 Boolean meta type. More...
 
struct  L4::Types::False
 False meta value. More...
 
struct  L4::Types::True
 True meta value. More...
 
struct  L4::Types::Same< A, B >
 Compare two data types for equality. More...
 

Namespaces

namespace  L4
 L4 low-level kernel interface.
 
namespace  L4::Types
 L4 basic type helpers for C++.
 

Macros

#define L4_TYPES_FLAGS_OPS_DEF(T)
 Helper macro to define a set of bitwise operators on an enum type.
 

Macro Definition Documentation

◆ L4_TYPES_FLAGS_OPS_DEF

#define L4_TYPES_FLAGS_OPS_DEF (   T)
Value:
friend constexpr T operator ~ (T f) \
{ \
return T(~static_cast<typename L4::Types::Int_for_type<T>::type>(f)); \
} \
\
friend constexpr T operator | (T l, T r) \
{ \
return T(static_cast<typename L4::Types::Int_for_type<T>::type>(l) \
| static_cast<typename L4::Types::Int_for_type<T>::type>(r)); \
} \
\
friend constexpr T operator & (T l, T r) \
{ \
return T(static_cast<typename L4::Types::Int_for_type<T>::type>(l) \
& static_cast<typename L4::Types::Int_for_type<T>::type>(r)); \
}
Int_for_size< sizeof(T)>::type type
The resulting unsigned integer type with the size like T.
Definition types:196

Helper macro to define a set of bitwise operators on an enum type.

This allows to use the enum type as bitmask type with '&', '|', and '~' operators that keep the enum type as result.

Definition at line 206 of file types.