2020-12-10 19:26:56 +01:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
namespace ss {
|
|
|
|
|
|
|
|
////////////////
|
|
|
|
// all except
|
|
|
|
////////////////
|
|
|
|
|
|
|
|
template <typename T, auto... Values>
|
|
|
|
struct ax {
|
2020-12-26 00:46:42 +01:00
|
|
|
private:
|
|
|
|
template <auto X, auto... Xs>
|
Updated and added new functions related to headers, resolved ODR issues, resolved clang-tidy warnings (#50)
* Bugfix/odr violations (#47)
* Make common non-member functions inline, remove unreachable line from get_line_buffer
* [skip ci] Fix namespace comments
* Resolve clang-tidy warnings (#48)
* Resolve clang-tidy warnings, update single_header_generator.py
* Update single header test, resolve additional clang-tidy warnings
* Add header and raw_header methods, update header usage methods error handling, write new and update existing unit tests
* Update parser error messages, fix parser tests
* Add [[nodiscard]] where fitting, update unit tests (#49)
* Add const where fitting, make splitter class members private, add #pragma once to ssp.hpp
* Modify header parsing for empty headers, update old and add new tests for header parsing
* Enable the parser to accept a header with one empty field, update unit tests
* Fix test CMakeLists.txt typo
2024-03-14 17:22:57 +01:00
|
|
|
[[nodiscard]] bool ss_valid_impl(const T& x) const {
|
2020-12-26 00:46:42 +01:00
|
|
|
if constexpr (sizeof...(Xs) != 0) {
|
|
|
|
return x != X && ss_valid_impl<Xs...>(x);
|
2020-12-10 19:26:56 +01:00
|
|
|
}
|
2020-12-26 00:46:42 +01:00
|
|
|
return x != X;
|
|
|
|
}
|
2020-12-10 19:26:56 +01:00
|
|
|
|
2020-12-26 00:46:42 +01:00
|
|
|
public:
|
Updated and added new functions related to headers, resolved ODR issues, resolved clang-tidy warnings (#50)
* Bugfix/odr violations (#47)
* Make common non-member functions inline, remove unreachable line from get_line_buffer
* [skip ci] Fix namespace comments
* Resolve clang-tidy warnings (#48)
* Resolve clang-tidy warnings, update single_header_generator.py
* Update single header test, resolve additional clang-tidy warnings
* Add header and raw_header methods, update header usage methods error handling, write new and update existing unit tests
* Update parser error messages, fix parser tests
* Add [[nodiscard]] where fitting, update unit tests (#49)
* Add const where fitting, make splitter class members private, add #pragma once to ssp.hpp
* Modify header parsing for empty headers, update old and add new tests for header parsing
* Enable the parser to accept a header with one empty field, update unit tests
* Fix test CMakeLists.txt typo
2024-03-14 17:22:57 +01:00
|
|
|
[[nodiscard]] bool ss_valid(const T& value) const {
|
2020-12-26 00:46:42 +01:00
|
|
|
return ss_valid_impl<Values...>(value);
|
|
|
|
}
|
2020-12-10 19:26:56 +01:00
|
|
|
|
Updated and added new functions related to headers, resolved ODR issues, resolved clang-tidy warnings (#50)
* Bugfix/odr violations (#47)
* Make common non-member functions inline, remove unreachable line from get_line_buffer
* [skip ci] Fix namespace comments
* Resolve clang-tidy warnings (#48)
* Resolve clang-tidy warnings, update single_header_generator.py
* Update single header test, resolve additional clang-tidy warnings
* Add header and raw_header methods, update header usage methods error handling, write new and update existing unit tests
* Update parser error messages, fix parser tests
* Add [[nodiscard]] where fitting, update unit tests (#49)
* Add const where fitting, make splitter class members private, add #pragma once to ssp.hpp
* Modify header parsing for empty headers, update old and add new tests for header parsing
* Enable the parser to accept a header with one empty field, update unit tests
* Fix test CMakeLists.txt typo
2024-03-14 17:22:57 +01:00
|
|
|
[[nodiscard]] const char* error() const {
|
2020-12-26 00:46:42 +01:00
|
|
|
return "value excluded";
|
|
|
|
}
|
2020-12-10 19:26:56 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
////////////////
|
|
|
|
// none except
|
|
|
|
////////////////
|
|
|
|
|
|
|
|
template <typename T, auto... Values>
|
|
|
|
struct nx {
|
2020-12-26 00:46:42 +01:00
|
|
|
private:
|
|
|
|
template <auto X, auto... Xs>
|
Updated and added new functions related to headers, resolved ODR issues, resolved clang-tidy warnings (#50)
* Bugfix/odr violations (#47)
* Make common non-member functions inline, remove unreachable line from get_line_buffer
* [skip ci] Fix namespace comments
* Resolve clang-tidy warnings (#48)
* Resolve clang-tidy warnings, update single_header_generator.py
* Update single header test, resolve additional clang-tidy warnings
* Add header and raw_header methods, update header usage methods error handling, write new and update existing unit tests
* Update parser error messages, fix parser tests
* Add [[nodiscard]] where fitting, update unit tests (#49)
* Add const where fitting, make splitter class members private, add #pragma once to ssp.hpp
* Modify header parsing for empty headers, update old and add new tests for header parsing
* Enable the parser to accept a header with one empty field, update unit tests
* Fix test CMakeLists.txt typo
2024-03-14 17:22:57 +01:00
|
|
|
[[nodiscard]] bool ss_valid_impl(const T& x) const {
|
2020-12-26 00:46:42 +01:00
|
|
|
if constexpr (sizeof...(Xs) != 0) {
|
|
|
|
return x == X || ss_valid_impl<Xs...>(x);
|
2020-12-10 19:26:56 +01:00
|
|
|
}
|
2020-12-26 00:46:42 +01:00
|
|
|
return x == X;
|
|
|
|
}
|
2020-12-10 19:26:56 +01:00
|
|
|
|
2020-12-26 00:46:42 +01:00
|
|
|
public:
|
Updated and added new functions related to headers, resolved ODR issues, resolved clang-tidy warnings (#50)
* Bugfix/odr violations (#47)
* Make common non-member functions inline, remove unreachable line from get_line_buffer
* [skip ci] Fix namespace comments
* Resolve clang-tidy warnings (#48)
* Resolve clang-tidy warnings, update single_header_generator.py
* Update single header test, resolve additional clang-tidy warnings
* Add header and raw_header methods, update header usage methods error handling, write new and update existing unit tests
* Update parser error messages, fix parser tests
* Add [[nodiscard]] where fitting, update unit tests (#49)
* Add const where fitting, make splitter class members private, add #pragma once to ssp.hpp
* Modify header parsing for empty headers, update old and add new tests for header parsing
* Enable the parser to accept a header with one empty field, update unit tests
* Fix test CMakeLists.txt typo
2024-03-14 17:22:57 +01:00
|
|
|
[[nodiscard]] bool ss_valid(const T& value) const {
|
2020-12-26 00:46:42 +01:00
|
|
|
return ss_valid_impl<Values...>(value);
|
|
|
|
}
|
2020-12-10 19:26:56 +01:00
|
|
|
|
Updated and added new functions related to headers, resolved ODR issues, resolved clang-tidy warnings (#50)
* Bugfix/odr violations (#47)
* Make common non-member functions inline, remove unreachable line from get_line_buffer
* [skip ci] Fix namespace comments
* Resolve clang-tidy warnings (#48)
* Resolve clang-tidy warnings, update single_header_generator.py
* Update single header test, resolve additional clang-tidy warnings
* Add header and raw_header methods, update header usage methods error handling, write new and update existing unit tests
* Update parser error messages, fix parser tests
* Add [[nodiscard]] where fitting, update unit tests (#49)
* Add const where fitting, make splitter class members private, add #pragma once to ssp.hpp
* Modify header parsing for empty headers, update old and add new tests for header parsing
* Enable the parser to accept a header with one empty field, update unit tests
* Fix test CMakeLists.txt typo
2024-03-14 17:22:57 +01:00
|
|
|
[[nodiscard]] const char* error() const {
|
2020-12-26 00:46:42 +01:00
|
|
|
return "value excluded";
|
|
|
|
}
|
2020-12-10 19:26:56 +01:00
|
|
|
};
|
|
|
|
|
2021-01-03 15:38:07 +01:00
|
|
|
////////////////
|
|
|
|
// greater than or equal to
|
|
|
|
// greater than
|
|
|
|
// less than
|
|
|
|
// less than or equal to
|
|
|
|
////////////////
|
|
|
|
|
|
|
|
template <typename T, auto N>
|
|
|
|
struct gt {
|
Updated and added new functions related to headers, resolved ODR issues, resolved clang-tidy warnings (#50)
* Bugfix/odr violations (#47)
* Make common non-member functions inline, remove unreachable line from get_line_buffer
* [skip ci] Fix namespace comments
* Resolve clang-tidy warnings (#48)
* Resolve clang-tidy warnings, update single_header_generator.py
* Update single header test, resolve additional clang-tidy warnings
* Add header and raw_header methods, update header usage methods error handling, write new and update existing unit tests
* Update parser error messages, fix parser tests
* Add [[nodiscard]] where fitting, update unit tests (#49)
* Add const where fitting, make splitter class members private, add #pragma once to ssp.hpp
* Modify header parsing for empty headers, update old and add new tests for header parsing
* Enable the parser to accept a header with one empty field, update unit tests
* Fix test CMakeLists.txt typo
2024-03-14 17:22:57 +01:00
|
|
|
[[nodiscard]] bool ss_valid(const T& value) const {
|
2021-01-03 15:38:07 +01:00
|
|
|
return value > N;
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
template <typename T, auto N>
|
|
|
|
struct gte {
|
Updated and added new functions related to headers, resolved ODR issues, resolved clang-tidy warnings (#50)
* Bugfix/odr violations (#47)
* Make common non-member functions inline, remove unreachable line from get_line_buffer
* [skip ci] Fix namespace comments
* Resolve clang-tidy warnings (#48)
* Resolve clang-tidy warnings, update single_header_generator.py
* Update single header test, resolve additional clang-tidy warnings
* Add header and raw_header methods, update header usage methods error handling, write new and update existing unit tests
* Update parser error messages, fix parser tests
* Add [[nodiscard]] where fitting, update unit tests (#49)
* Add const where fitting, make splitter class members private, add #pragma once to ssp.hpp
* Modify header parsing for empty headers, update old and add new tests for header parsing
* Enable the parser to accept a header with one empty field, update unit tests
* Fix test CMakeLists.txt typo
2024-03-14 17:22:57 +01:00
|
|
|
[[nodiscard]] bool ss_valid(const T& value) const {
|
2021-01-03 15:38:07 +01:00
|
|
|
return value >= N;
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
template <typename T, auto N>
|
|
|
|
struct lt {
|
Updated and added new functions related to headers, resolved ODR issues, resolved clang-tidy warnings (#50)
* Bugfix/odr violations (#47)
* Make common non-member functions inline, remove unreachable line from get_line_buffer
* [skip ci] Fix namespace comments
* Resolve clang-tidy warnings (#48)
* Resolve clang-tidy warnings, update single_header_generator.py
* Update single header test, resolve additional clang-tidy warnings
* Add header and raw_header methods, update header usage methods error handling, write new and update existing unit tests
* Update parser error messages, fix parser tests
* Add [[nodiscard]] where fitting, update unit tests (#49)
* Add const where fitting, make splitter class members private, add #pragma once to ssp.hpp
* Modify header parsing for empty headers, update old and add new tests for header parsing
* Enable the parser to accept a header with one empty field, update unit tests
* Fix test CMakeLists.txt typo
2024-03-14 17:22:57 +01:00
|
|
|
[[nodiscard]] bool ss_valid(const T& value) const {
|
2021-01-03 15:38:07 +01:00
|
|
|
return value < N;
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
template <typename T, auto N>
|
|
|
|
struct lte {
|
Updated and added new functions related to headers, resolved ODR issues, resolved clang-tidy warnings (#50)
* Bugfix/odr violations (#47)
* Make common non-member functions inline, remove unreachable line from get_line_buffer
* [skip ci] Fix namespace comments
* Resolve clang-tidy warnings (#48)
* Resolve clang-tidy warnings, update single_header_generator.py
* Update single header test, resolve additional clang-tidy warnings
* Add header and raw_header methods, update header usage methods error handling, write new and update existing unit tests
* Update parser error messages, fix parser tests
* Add [[nodiscard]] where fitting, update unit tests (#49)
* Add const where fitting, make splitter class members private, add #pragma once to ssp.hpp
* Modify header parsing for empty headers, update old and add new tests for header parsing
* Enable the parser to accept a header with one empty field, update unit tests
* Fix test CMakeLists.txt typo
2024-03-14 17:22:57 +01:00
|
|
|
[[nodiscard]] bool ss_valid(const T& value) const {
|
2021-01-03 15:38:07 +01:00
|
|
|
return value <= N;
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2020-12-10 19:26:56 +01:00
|
|
|
////////////////
|
|
|
|
// in range
|
|
|
|
////////////////
|
|
|
|
|
|
|
|
template <typename T, auto Min, auto Max>
|
|
|
|
struct ir {
|
Updated and added new functions related to headers, resolved ODR issues, resolved clang-tidy warnings (#50)
* Bugfix/odr violations (#47)
* Make common non-member functions inline, remove unreachable line from get_line_buffer
* [skip ci] Fix namespace comments
* Resolve clang-tidy warnings (#48)
* Resolve clang-tidy warnings, update single_header_generator.py
* Update single header test, resolve additional clang-tidy warnings
* Add header and raw_header methods, update header usage methods error handling, write new and update existing unit tests
* Update parser error messages, fix parser tests
* Add [[nodiscard]] where fitting, update unit tests (#49)
* Add const where fitting, make splitter class members private, add #pragma once to ssp.hpp
* Modify header parsing for empty headers, update old and add new tests for header parsing
* Enable the parser to accept a header with one empty field, update unit tests
* Fix test CMakeLists.txt typo
2024-03-14 17:22:57 +01:00
|
|
|
[[nodiscard]] bool ss_valid(const T& value) const {
|
2020-12-26 00:46:42 +01:00
|
|
|
return value >= Min && value <= Max;
|
|
|
|
}
|
2020-12-10 19:26:56 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
////////////////
|
|
|
|
// out of range
|
|
|
|
////////////////
|
|
|
|
|
|
|
|
template <typename T, auto Min, auto Max>
|
|
|
|
struct oor {
|
Updated and added new functions related to headers, resolved ODR issues, resolved clang-tidy warnings (#50)
* Bugfix/odr violations (#47)
* Make common non-member functions inline, remove unreachable line from get_line_buffer
* [skip ci] Fix namespace comments
* Resolve clang-tidy warnings (#48)
* Resolve clang-tidy warnings, update single_header_generator.py
* Update single header test, resolve additional clang-tidy warnings
* Add header and raw_header methods, update header usage methods error handling, write new and update existing unit tests
* Update parser error messages, fix parser tests
* Add [[nodiscard]] where fitting, update unit tests (#49)
* Add const where fitting, make splitter class members private, add #pragma once to ssp.hpp
* Modify header parsing for empty headers, update old and add new tests for header parsing
* Enable the parser to accept a header with one empty field, update unit tests
* Fix test CMakeLists.txt typo
2024-03-14 17:22:57 +01:00
|
|
|
[[nodiscard]] bool ss_valid(const T& value) const {
|
2020-12-26 00:46:42 +01:00
|
|
|
return value < Min || value > Max;
|
|
|
|
}
|
2020-12-10 19:26:56 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
////////////////
|
|
|
|
// non empty
|
|
|
|
////////////////
|
|
|
|
|
|
|
|
template <typename T>
|
|
|
|
struct ne {
|
Updated and added new functions related to headers, resolved ODR issues, resolved clang-tidy warnings (#50)
* Bugfix/odr violations (#47)
* Make common non-member functions inline, remove unreachable line from get_line_buffer
* [skip ci] Fix namespace comments
* Resolve clang-tidy warnings (#48)
* Resolve clang-tidy warnings, update single_header_generator.py
* Update single header test, resolve additional clang-tidy warnings
* Add header and raw_header methods, update header usage methods error handling, write new and update existing unit tests
* Update parser error messages, fix parser tests
* Add [[nodiscard]] where fitting, update unit tests (#49)
* Add const where fitting, make splitter class members private, add #pragma once to ssp.hpp
* Modify header parsing for empty headers, update old and add new tests for header parsing
* Enable the parser to accept a header with one empty field, update unit tests
* Fix test CMakeLists.txt typo
2024-03-14 17:22:57 +01:00
|
|
|
[[nodiscard]] bool ss_valid(const T& value) const {
|
2020-12-26 00:46:42 +01:00
|
|
|
return !value.empty();
|
|
|
|
}
|
2020-12-10 19:26:56 +01:00
|
|
|
|
Updated and added new functions related to headers, resolved ODR issues, resolved clang-tidy warnings (#50)
* Bugfix/odr violations (#47)
* Make common non-member functions inline, remove unreachable line from get_line_buffer
* [skip ci] Fix namespace comments
* Resolve clang-tidy warnings (#48)
* Resolve clang-tidy warnings, update single_header_generator.py
* Update single header test, resolve additional clang-tidy warnings
* Add header and raw_header methods, update header usage methods error handling, write new and update existing unit tests
* Update parser error messages, fix parser tests
* Add [[nodiscard]] where fitting, update unit tests (#49)
* Add const where fitting, make splitter class members private, add #pragma once to ssp.hpp
* Modify header parsing for empty headers, update old and add new tests for header parsing
* Enable the parser to accept a header with one empty field, update unit tests
* Fix test CMakeLists.txt typo
2024-03-14 17:22:57 +01:00
|
|
|
[[nodiscard]] const char* error() const {
|
2020-12-26 00:46:42 +01:00
|
|
|
return "empty field";
|
|
|
|
}
|
2020-12-10 19:26:56 +01:00
|
|
|
};
|
|
|
|
|
Updated and added new functions related to headers, resolved ODR issues, resolved clang-tidy warnings (#50)
* Bugfix/odr violations (#47)
* Make common non-member functions inline, remove unreachable line from get_line_buffer
* [skip ci] Fix namespace comments
* Resolve clang-tidy warnings (#48)
* Resolve clang-tidy warnings, update single_header_generator.py
* Update single header test, resolve additional clang-tidy warnings
* Add header and raw_header methods, update header usage methods error handling, write new and update existing unit tests
* Update parser error messages, fix parser tests
* Add [[nodiscard]] where fitting, update unit tests (#49)
* Add const where fitting, make splitter class members private, add #pragma once to ssp.hpp
* Modify header parsing for empty headers, update old and add new tests for header parsing
* Enable the parser to accept a header with one empty field, update unit tests
* Fix test CMakeLists.txt typo
2024-03-14 17:22:57 +01:00
|
|
|
} /* namespace ss */
|