8 for (
auto& x: Isotopologues)
if (not
good_enum(x.spec))
return false;
13 "Cannot have invalid species in the isotopologues list.\n"
14 "One of your newly added or modified species cannot be understood\n");
18 for (Index i=0; i<Index(Species::Species::FINAL); i++) {
19 auto a = Species::Species(i);
20 auto b = Species::toShortName(
a);
21 auto c = Species::fromShortName(
b);
30 "Cannot convert some species from to its short name and back to its enum-value.\n"
31 "All species in Species::Species must be translatable to and from short names in\n"
32 "the two function signatures:\n\n"
33 "\tstd::string_view toShortName(Species x)\n"
34 "\tSpecies fromShortName(const std::string_view x)\n"
36 "Please ensure that any new Species you've added is available in these functions\n"
37 "and in all functions that makes use of a Species-switch.\n");
42 static_assert(Isotopologues.size() not_eq 0);
43 for (std::size_t i=0; i<Isotopologues.size()-1; i++) {
44 auto&
a = Isotopologues[i];
45 auto&
b = Isotopologues[i+1];
46 if (std::size_t(
a.spec) > std::size_t(
b.spec)) {
55"Species in Isotopologues must be increasing.\n"
56"One of your newly added isotopologues is not in increasing order\n");
61 static_assert(Isotopologues.size() not_eq 0);
62 for (std::size_t i=0; i<Isotopologues.size()-1; i++) {
63 auto&
a = Isotopologues[i];
64 auto&
b = Isotopologues[i+1];
65 if (
a.spec ==
b.spec) {
66 if (
a.isotname.compare(
b.isotname) >= 0) {
76 "Isotopologues must be increasing.\n"
77 "One of your newly added isotopologues is not in increasing order\n");
81 "There's a missing value in the default isotopologue_ratiosInitFromBuiltin()"
88 for (
auto qn: local_types)
for (
auto qn2: global_types)
if (qn == qn2)
return false;
91 if (global_types.size() + local_types.size() not_eq
size_t(Type::FINAL))
return false;
94 for (
auto qn: local_types)
if (common_value_type(common_value_type(qn), ValueType::H) not_eq ValueType::H)
return false;
constexpr bool good_enum(EnumType x) noexcept
Checks if the enum number is good.
constexpr bool testIsotopologuesIncreasing() noexcept
Don't call this manually, it only exists to catch a developer error.
constexpr bool check_global_local_types()
constexpr bool testSpeciesIncreasing() noexcept
Don't call this manually, it only exists to catch a developer error.
constexpr bool testShortNames() noexcept
Don't call this manually, it only exists to catch a developer error.
constexpr bool testIsotopologuesAllValid() noexcept
Don't call this manually, it only exists to catch a developer error.
constexpr IsotopologueRatios isotopologue_ratiosInitFromBuiltin()
constexpr bool all_isotopes_have_a_value() const noexcept