template<concepts::settings S1, concepts::settings S2>
struct rbr::is_equivalent< S1, S2 >
Checks the equivalence of two rbr::settings.
Two rbr::settings are equivalent if they contain the same exact set of keywords irregardless of their values or value types.
- Template Parameters
-
Helper Value
{
template<concepts::settings S1, concepts::settings S2>
}
Main Raberu namespace.
Definition: drop.hpp:11
Checks the equivalence of two rbr::settings.
Definition: is_equivalent.hpp:47
Contains the result of a call to rbr::is_equivalent.
Example:
#include <raberu/raberu.hpp>
#include <iostream>
int main()
{
auto s1 =
rbr::settings(
"opt1"_kw = 3,
"opt2"_kw = 22,
"yes"_fl);
auto s2 =
rbr::settings(
"opt1"_kw = 7.8,
"yes"_fl,
"opt2"_kw = 789.987);
auto s3 =
rbr::settings(
"opt1"_kw = 7.8,
"yes"_fl,
"opt3"_kw = 789.987);
std::cout << std::boolalpha << rbr::is_equivalent_v<decltype(s2), decltype(s3)> << "\n";
std::cout << std::boolalpha << rbr::is_equivalent_v<decltype(s3), decltype(s2)> << "\n";
std::cout << std::boolalpha << rbr::is_equivalent_v<decltype(s2), decltype(s1)> << "\n";
std::cout << std::boolalpha << rbr::is_equivalent_v<decltype(s1), decltype(s2)> << "\n";
std::cout << std::boolalpha << rbr::is_equivalent_v<decltype(s1), decltype(s1)> << "\n";
std::cout << std::boolalpha << rbr::is_equivalent_v<decltype(s2), decltype(s2)> << "\n";
}
Raberu literals namespace.
Definition: keywords.hpp:369
Defines a group of options for processing.
Definition: settings.hpp:50