wxMaxima
Loading...
Searching...
No Matches
Public Member Functions
EnumWrapper< Enum, Storage, defaultValue, type > Class Template Reference

A wrapper for legacy enumerated types that can be stored in a type smaller than an int. More...

#include <EnumWrapper.h>

Public Member Functions

constexpr EnumWrapper (Storage)=delete
 
constexpr EnumWrapper (Enum value) noexcept
 
constexpr operator Enum () const noexcept
 
constexpr operator Storage () const =delete
 
constexpr std::size_t hash () const
 
constexpr bool operator== (EnumWrapper o) const
 
constexpr bool operator== (Enum o) const
 
constexpr bool operator!= (EnumWrapper o) const
 
constexpr bool operator!= (Enum o) const
 

Detailed Description

template<typename Enum, typename Storage, Enum defaultValue = Enum{}, typename std::enable_if< std::is_enum< Enum >::value &&std::is_integral< Storage >::value, bool >::type = true>
class EnumWrapper< Enum, Storage, defaultValue, type >

A wrapper for legacy enumerated types that can be stored in a type smaller than an int.

This wrapper is meant for storage as a class member.

  1. Uses outside of class members are unnecessary and a bug.
  2. Passing this wrapper as an argument to a function/method is a pessimization. It's not meant to be used that way.

The documentation for this class was generated from the following file: