FLANG
Fortran::evaluate::match::AnyOfPattern< Patterns > Struct Template Reference

#include <flang/Evaluate/match.h>

Public Types

using Indexes = std::index_sequence_for<Patterns...>
using MatchTypes = std::tuple<typename Patterns::MatchType...>

Public Member Functions

template<typename... Ops>
 AnyOfPattern (const Ops &...ops)
template<typename U>
bool match (const U &input) const

Public Attributes

std::variant< const Patterns *..., std::monostate > ref

Detailed Description

template<typename... Patterns>
struct Fortran::evaluate::match::AnyOfPattern< Patterns >

Matches one of the patterns provided as template arguments. Upon creation of an AnyOfPattern object with some arguments, say args, each of the pattern objects will be created using args as arguments to the constructor. This means that each of the patterns should be constructible from args, in particular all patterns should take the same number of inputs. So, for example, AnyOfPattern<SomeBinaryOp, OtherBinaryOp> is ok, whereas AnyOfPattern<SomeBinaryOp, SomeTernaryOp> is not.

Member Data Documentation

◆ ref

template<typename... Patterns>
std::variant<const Patterns *..., std::monostate> Fortran::evaluate::match::AnyOfPattern< Patterns >::ref
mutable
Initial value:
{
std::monostate{}}

The documentation for this struct was generated from the following file: