mirror of
https://github.com/red0124/ssp.git
synced 2025-12-14 21:59:55 +01:00
make indent with 4 caracters instead of 8
This commit is contained in:
@@ -8,23 +8,23 @@ namespace ss {
|
||||
|
||||
template <typename T, auto... Values>
|
||||
struct ax {
|
||||
private:
|
||||
template <auto X, auto... Xs>
|
||||
bool ss_valid_impl(const T& x) const {
|
||||
if constexpr (sizeof...(Xs) != 0) {
|
||||
return x != X && ss_valid_impl<Xs...>(x);
|
||||
}
|
||||
return x != X;
|
||||
private:
|
||||
template <auto X, auto... Xs>
|
||||
bool ss_valid_impl(const T& x) const {
|
||||
if constexpr (sizeof...(Xs) != 0) {
|
||||
return x != X && ss_valid_impl<Xs...>(x);
|
||||
}
|
||||
return x != X;
|
||||
}
|
||||
|
||||
public:
|
||||
bool ss_valid(const T& value) const {
|
||||
return ss_valid_impl<Values...>(value);
|
||||
}
|
||||
public:
|
||||
bool ss_valid(const T& value) const {
|
||||
return ss_valid_impl<Values...>(value);
|
||||
}
|
||||
|
||||
const char* error() const {
|
||||
return "value excluded";
|
||||
}
|
||||
const char* error() const {
|
||||
return "value excluded";
|
||||
}
|
||||
};
|
||||
|
||||
////////////////
|
||||
@@ -33,23 +33,23 @@ struct ax {
|
||||
|
||||
template <typename T, auto... Values>
|
||||
struct nx {
|
||||
private:
|
||||
template <auto X, auto... Xs>
|
||||
bool ss_valid_impl(const T& x) const {
|
||||
if constexpr (sizeof...(Xs) != 0) {
|
||||
return x == X || ss_valid_impl<Xs...>(x);
|
||||
}
|
||||
return x == X;
|
||||
private:
|
||||
template <auto X, auto... Xs>
|
||||
bool ss_valid_impl(const T& x) const {
|
||||
if constexpr (sizeof...(Xs) != 0) {
|
||||
return x == X || ss_valid_impl<Xs...>(x);
|
||||
}
|
||||
return x == X;
|
||||
}
|
||||
|
||||
public:
|
||||
bool ss_valid(const T& value) const {
|
||||
return ss_valid_impl<Values...>(value);
|
||||
}
|
||||
public:
|
||||
bool ss_valid(const T& value) const {
|
||||
return ss_valid_impl<Values...>(value);
|
||||
}
|
||||
|
||||
const char* error() const {
|
||||
return "value excluded";
|
||||
}
|
||||
const char* error() const {
|
||||
return "value excluded";
|
||||
}
|
||||
};
|
||||
|
||||
////////////////
|
||||
@@ -58,13 +58,13 @@ struct nx {
|
||||
|
||||
template <typename T, auto Min, auto Max>
|
||||
struct ir {
|
||||
bool ss_valid(const T& value) const {
|
||||
return value >= Min && value <= Max;
|
||||
}
|
||||
bool ss_valid(const T& value) const {
|
||||
return value >= Min && value <= Max;
|
||||
}
|
||||
|
||||
const char* error() const {
|
||||
return "out of range";
|
||||
}
|
||||
const char* error() const {
|
||||
return "out of range";
|
||||
}
|
||||
};
|
||||
|
||||
////////////////
|
||||
@@ -73,13 +73,13 @@ struct ir {
|
||||
|
||||
template <typename T, auto Min, auto Max>
|
||||
struct oor {
|
||||
bool ss_valid(const T& value) const {
|
||||
return value < Min || value > Max;
|
||||
}
|
||||
bool ss_valid(const T& value) const {
|
||||
return value < Min || value > Max;
|
||||
}
|
||||
|
||||
const char* error() const {
|
||||
return "in restricted range";
|
||||
}
|
||||
const char* error() const {
|
||||
return "in restricted range";
|
||||
}
|
||||
};
|
||||
|
||||
////////////////
|
||||
@@ -88,13 +88,13 @@ struct oor {
|
||||
|
||||
template <typename T>
|
||||
struct ne {
|
||||
bool ss_valid(const T& value) const {
|
||||
return !value.empty();
|
||||
}
|
||||
bool ss_valid(const T& value) const {
|
||||
return !value.empty();
|
||||
}
|
||||
|
||||
const char* error() const {
|
||||
return "empty field";
|
||||
}
|
||||
const char* error() const {
|
||||
return "empty field";
|
||||
}
|
||||
};
|
||||
|
||||
} /* ss */
|
||||
|
||||
Reference in New Issue
Block a user