cortexlib  v0.2.0
Classes | Namespaces | Functions
match.hxx File Reference

Defines a simple template overload for matching variants types using a branch style function selection. More...

#include <utility>
#include <variant>
Include dependency graph for match.hxx:

Go to the source code of this file.

Classes

struct  cxl::utils::match< Fs >
 match structure More...
 
struct  cxl::utils::match_any
 Wildcard Empty Placeholder. More...
 

Namespaces

 cxl
 
 cxl::utils
 

Functions

template<typename... Fs>
 cxl::utils::match (Fs &&...) -> match< std::remove_reference_t< Fs >... >
 Template Deduction Guide. More...
 
template<typename... Ts, typename... Fs>
constexpr auto cxl::utils::operator>> (const std::variant< Ts... > &var, const match< Fs... > &m) -> void
 Match Expression Notation. More...
 
template<typename... Ts, typename... Fs>
constexpr auto cxl::utils::operator<< (const std::variant< Ts... > &var, const match< Fs... > &m) -> decltype(auto)
 Match Expression Assignment Overload. More...
 

Detailed Description

Defines a simple template overload for matching variants types using a branch style function selection.

Author: Tyler Swann (tyler.nosp@m..swa.nosp@m.nn05@.nosp@m.gmai.nosp@m.l.com)

Header Version: v0.1.0

Date: 23-03-2023

License: MIT

Copyright: Copyright (c) 2022-23