22#include "marley/Error.hh"
23#include "marley/Parity.hh"
28 else throw marley::Error(
"Invalid parity " + std::to_string(i)
29 +
" passed to constructor of marley::Parity" );
39 else throw marley::Error(
"Invalid parity " + std::to_string(i)
40 +
" assigned to variable of type marley::Parity" );
49 else throw marley::Error( std::string(
"Invalid parity character \"") + c
50 +
"\" encountered in marley::Parity::from_char()" );
Base class for all exceptions thrown by MARLEY functions.
Type-safe representation of a parity value (either +1 or -1)
bool is_positive_
Boolean representation of the parity value that is true when the parity is +1 and false when it is -1...
void from_char(const char c)
Assign a value to this Parity object from a char.
constexpr Parity()
Default constructor chooses positive parity.
marley::Parity & operator=(const int &i)
Assigns a parity value using an integer.