TupleElementEquals Struct Reference

#include <tuple.h>

Detailed Description

A utility class to generate a binary compare function that can be used to test if a specific tuple element equals another value. Example:

BaseArray<Tuple<String, Int>> data;
auto match1 = Find(data, ByValue(42, TupleElementEquals::ByIndex<1>()));
auto match2 = Find(data, ByValue("Hello"_s, TupleElementEquals::ByType<String>()));

Classes

struct  ByIndex
 
struct  ByType
 
maxon::ByValue
auto ByValue(const T &value) -> PredicateMatcher< ValuePredicate< T >>
Returns a value matcher for the given value.
Definition: algorithms.h:2535