μHAL (v2.8.17)
Part of the IPbus software repository
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Static Public Member Functions | List of all members
visit_helper< Variant > Struct Template Reference

Helper class which abstracts away variant's visit function. More...

#include </builds/ipbus/ipbus-software/uhal/python/pybind11-python2/include/pybind11/stl.h>

Static Public Member Functions

template<typename... Args>
static auto call (Args &&...args) -> decltype(visit(std::forward< Args >(args)...))
 
template<typename... Args>
static auto call (Args &&...args) -> decltype(visit(std::forward< Args >(args)...))
 

Detailed Description

template<template< typename... > class Variant>
struct visit_helper< Variant >

Helper class which abstracts away variant's visit function.

std::variant and similar namespace::variant types which provide a namespace::visit() function are handled here automatically using argument-dependent lookup. Users can provide specializations for other variant-like classes, e.g. boost::variant and boost::apply_visitor.

Definition at line 356 of file stl.h.

Member Function Documentation

◆ call() [1/2]

template<template< typename... > class Variant>
template<typename... Args>
static auto visit_helper< Variant >::call ( Args &&...  args) -> decltype(visit(std::forward<Args>(args)...))
inlinestatic

Definition at line 358 of file stl.h.

Referenced by variant_caster< V< Ts... > >::cast().

◆ call() [2/2]

template<template< typename... > class Variant>
template<typename... Args>
static auto visit_helper< Variant >::call ( Args &&...  args) -> decltype(visit(std::forward<Args>(args)...))
inlinestatic

Definition at line 379 of file stl.h.


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