Audacity 3.2.0
Classes | Namespaces | Typedefs | Functions
Variant.h File Reference

emulates std::visit for one visitor More...

#include <algorithm>
#include <array>
#include <cassert>
#include <functional>
#include <type_traits>
#include <utility>
#include <variant>
#include <stdexcept>
Include dependency graph for Variant.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  Variant::detail::VisitHelperReturn< Visitor, Variant >
 Help to define Visit() below. More...
 
struct  Variant::detail::type_identity< T >
 Standard in C++20. More...
 

Namespaces

namespace  Variant
 
namespace  Variant::detail
 

Typedefs

template<typename T >
using Variant::detail::deduced_variant = typename decltype(deduce_variant(std::declval< T >()))::type
 

Functions

template<typename Visitor , typename Variant >
auto Variant::detail::VisitHelperBad (Visitor &&, Variant &&) -> typename VisitHelperReturn< Visitor &&, Variant && >::type
 Help to define Visit() below. More...
 
template<size_t Index, typename Visitor , typename Variant >
decltype(auto) Variant::detail::VisitHelperFunction (Visitor &&vis, Variant &&var)
 Help to define Visit() below. More...
 
template<size_t Index, typename Visitor , typename Variant >
auto Variant::detail::TypeCheckedVisitHelperFunction (Visitor &&vis, Variant &&var) -> typename VisitHelperReturn< Visitor &&, Variant && >::type
 Help to define Visit() below. More...
 
template<size_t... Indices, typename Visitor , typename Variant >
decltype(auto) Variant::detail::VisitHelper (std::index_sequence< Indices... >, Visitor &&vis, Variant &&var)
 Help to define Visit() below. More...
 
auto Variant::detail::deduce_variant (...) -> void
 Unevaluated. More...
 
template<typename... Types>
auto Variant::detail::deduce_variant (std::variant< Types... > &v) -> type_identity< std::remove_reference_t< decltype(v)> >
 
template<typename... Types>
auto Variant::detail::deduce_variant (std::variant< Types... > &&v) -> type_identity< std::remove_reference_t< decltype(v)> >
 
template<typename... Types>
auto Variant::detail::deduce_variant (const std::variant< Types... > &v) -> type_identity< std::remove_reference_t< decltype(v)> >
 
template<typename... Types>
auto Variant::detail::deduce_variant (const std::variant< Types... > &&v) -> type_identity< std::remove_reference_t< decltype(v)> >
 
template<typename ForwardType , typename Variant >
decltype(auto) Variant::detail::forward_variant (Variant &var)
 
template<typename ForwardType , typename Variant >
decltype(auto) Variant::detail::forward_variant (const Variant &var)
 
template<typename Visitor , typename Variant , typename VariantBase = detail::deduced_variant<Variant &&>>
decltype(auto) Variant::Visit (Visitor &&vis, Variant &&var)
 Mimic some of std::visit, for the case of one visitor only. More...
 

Detailed Description

emulates std::visit for one visitor


Audacity: A Digital Audio Editor

Paul Licameli split from MemoryX.h

Definition in file Variant.h.