Convenience class for configuration options with regex support. More...
Convenience class for configuration options with regex support.
This template class provides a convenient way of handling configuraiton options, which can be either some basic type like std::string or regex.
T | Type of alternative to regex (e.g. std::string) |
#include <types.h>
Public Member Functions | |
or_regex ()=default | |
or_regex (T v) | |
Constructor from alternative type. | |
or_regex (std::regex r, std::string p) | |
Constructor from regex. | |
or_regex & | operator= (const T &v) |
or_regex & | operator= (const regex &v) |
bool | operator== (const T &v) const |
template<typename Ret > | |
std::optional< Ret > | get () const |
std::string | to_string () const |
const std::variant< T, regex > & | value () const |
bool | is_regex () const |
Private Attributes | |
std::variant< T, regex > | value_ |
|
default |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
private |