virthttp  0.0
libvirt http interface
tfe.hpp
Go to the documentation of this file.
1 #pragma once
2 
3 // True False Error
4 class TFE {
5  enum class Impl { t = 2, f = 1, e = 0 };
6  Impl v;
7 
8  public:
9  constexpr explicit TFE(int tfe) : v(Impl{tfe + 1}) {}
10  constexpr explicit operator bool() const noexcept { return v == Impl::t; }
11  [[nodiscard]] constexpr bool err() const noexcept { return v == Impl::e; }
12 };
constexpr TFE(int tfe)
Definition: tfe.hpp:9
constexpr bool err() const noexcept
Definition: tfe.hpp:11
Definition: tfe.hpp:4