OpenCV  4.5.5-dev
Open Source Computer Vision
Classes | Namespaces | Functions
variant.hpp File Reference
#include <array>
#include <type_traits>
#include <opencv2/gapi/util/compiler_hints.hpp>
#include <opencv2/gapi/util/throw.hpp>
#include <opencv2/gapi/util/util.hpp>
#include <opencv2/gapi/util/type_traits.hpp>

Classes

class  cv::util::bad_variant_access
 
struct  cv::util::monostate
 
struct  cv::util::static_indexed_visitor< R, Impl >
 
struct  cv::util::static_visitor< R, Impl >
 
struct  cv::util::type_list_element< Index, Types >
 
struct  cv::util::type_list_index< Target, Types >
 
struct  cv::util::detail::type_list_index_helper< I, Target, First, Remaining >
 
struct  cv::util::detail::type_list_index_helper< I, Target, First >
 
class  cv::util::variant< Ts >
 
struct  cv::util::variant_size< T >
 
struct  cv::util::variant_size< util::variant< Types... > >
 
struct  cv::util::detail::visitor_interface
 
struct  cv::util::detail::visitor_return_type_deduction_helper< R >
 

Namespaces

 cv
 "black box" representation of the file storage associated with a file on disk.
 
 cv::util
 
 cv::util::detail
 

Functions

template<typename ReturnType , std::size_t CurIndex, std::size_t ElemCount, typename Visitor , typename Variant , typename... VisitorArgs>
ReturnType cv::util::detail::apply_visitor_impl (Visitor &&, Variant &, std::true_type, std::false_type, VisitorArgs &&...)
 
template<typename ReturnType , std::size_t CurIndex, std::size_t ElemCount, typename Visitor , typename Variant , typename... VisitorArgs>
void cv::util::detail::apply_visitor_impl (Visitor &&, Variant &, std::true_type, std::true_type, VisitorArgs &&...)
 
template<typename ReturnType , std::size_t CurIndex, std::size_t ElemCount, typename Visitor , typename Variant , bool no_return_value, typename... VisitorArgs>
std::enable_if<!std::is_base_of< visitor_interface, typename std::decay< Visitor >::type >::value, ReturnType >::type cv::util::detail::apply_visitor_impl (Visitor &&visitor, Variant &&v, std::false_type not_processed, std::integral_constant< bool, no_return_value > should_no_return, VisitorArgs &&...args)
 
template<typename ReturnType , std::size_t CurIndex, std::size_t ElemCount, typename Visitor , typename Variant , bool no_return_value, typename... VisitorArgs>
std::enable_if< std::is_base_of< visitor_interface, typename std::decay< Visitor >::type >::value, ReturnType >::type cv::util::detail::apply_visitor_impl (Visitor &&visitor, Variant &&v, std::false_type not_processed, std::integral_constant< bool, no_return_value > should_no_return, VisitorArgs &&...args)
 
template<typename T , typename... Types>
T & cv::util::get (util::variant< Types... > &v)
 
template<typename T , typename... Types>
const T & cv::util::get (const util::variant< Types... > &v)
 
template<std::size_t Index, typename... Types>
util::type_list_element< Index, Types... >::type & cv::util::get (util::variant< Types... > &v)
 
template<std::size_t Index, typename... Types>
const util::type_list_element< Index, Types... >::type & cv::util::get (const util::variant< Types... > &v)
 
template<typename T , typename... Types>
T * cv::util::get_if (util::variant< Types... > *v) noexcept
 
template<typename T , typename... Types>
const T * cv::util::get_if (const util::variant< Types... > *v) noexcept
 
template<typename T , typename... Types>
bool cv::util::holds_alternative (const util::variant< Types... > &v) noexcept
 
template<std::size_t CurIndex, typename ReturnType , typename Visitor , class Value , typename... VisitorArgs>
std::enable_if< std::is_base_of< static_visitor< ReturnType, typename std::decay< Visitor >::type >, typename std::decay< Visitor >::type >::value, ReturnType >::type cv::util::detail::invoke_class_visitor (Visitor &visitor, Value &&v, VisitorArgs &&...args)
 
template<std::size_t CurIndex, typename ReturnType , typename Visitor , class Value , typename... VisitorArgs>
std::enable_if< std::is_base_of< static_indexed_visitor< ReturnType, typename std::decay< Visitor >::type >, typename std::decay< Visitor >::type >::value, ReturnType >::type cv::util::detail::invoke_class_visitor (Visitor &visitor, Value &&v, VisitorArgs &&...args)
 
template<typename... Us>
bool cv::util::operator!= (const variant< Us... > &lhs, const variant< Us... > &rhs)
 
bool cv::util::operator== (const util::monostate &, const util::monostate &)
 
template<typename... Us>
bool cv::util::operator== (const variant< Us... > &lhs, const variant< Us... > &rhs)
 
template<typename Visitor , typename Variant , typename... VisitorArg>
auto cv::util::visit (Visitor &visitor, const Variant &var, VisitorArg &&...args) -> decltype(visitor(get< 0 >(var)))
 
template<typename Visitor , typename Variant >
auto cv::util::visit (Visitor &&visitor, const Variant &var) -> decltype(visitor(get< 0 >(var)))