virthttp  0.0
libvirt http interface
Classes | Namespaces | Macros | Typedefs | Functions
utility.hpp File Reference
#include <algorithm>
#include <cstdlib>
#include <optional>
#include <type_traits>
#include <gsl/gsl>
#include "cexpr_algs.hpp"

Go to the source code of this file.

Classes

class  Empty
 
struct  RemoveOptional< class >
 
struct  RemoveOptional< std::optional< T > >
 
class  EHTag
 
class  EnumHelper< CRTP >
 
class  EnumSetHelper< CRTP >
 
class  EnumSetIterator< E >
 
class  UniqueZstring
 
struct  ext::function_traits< F >
 
struct  ext::function_traits< R(*)(Args...)>
 
struct  ext::function_traits< R(Args...)>
 
struct  ext::function_traits< R(Args...)>::Arg< N >
 
struct  ext::function_traits< R(C::*)(Args...)>
 
struct  ext::function_traits< R(C::*)(Args...) const >
 
struct  ext::function_traits< R(C::*)>
 
struct  ext::function_traits< F >
 
struct  ext::function_traits< F >::Arg< N >
 
struct  ext::function_traits< F & >
 
struct  ext::function_traits< F && >
 
struct  NoallocWFree< T >
 
struct  UniqueSpan< T, D >
 
struct  UniqueNullTerminatedSpan< T, D >
 
struct  UniqueFalseTerminatedSpan< T, D >
 
struct  Visitor< Base >
 

Namespaces

 ext
 
 virt::meta
 
 virt::meta::impl::any
 
 virt::meta::light
 
 virt::meta::heavy
 

Macros

#define UNREACHABLE
 

Typedefs

template<class OptT >
using RemoveOptional_t = typename RemoveOptional< OptT >::type
 
template<typename T >
using passive = T
 

Functions

template<typename E , std::enable_if_t< std::is_enum_v< E >, int > = 0>
decltype(auto) constexpr to_integral (E e)
 
template<typename T , std::enable_if_t< std::is_integral_v< T >, int > = 0>
decltype(auto) constexpr to_integral (T v)
 
template<class... Ts>
void sink (Ts &&...ts)
 
template<class Lambda , class... Ts>
constexpr auto test_sfinae (Lambda lambda, Ts &&...) -> decltype(lambda(std::declval< Ts >()...), bool
 
constexpr bool test_sfinae (...)
 
template<typename T , typename V , size_t... I>
void visit_impl (T &&t, V &&v, std::index_sequence< I... >)
 
template<typename T , typename V >
void visit (T &&t, V &&v)
 
template<typename T >
void freeany (T ptr)
 
template<class E , class = std::enable_if_t<std::is_base_of_v<EnumSetHelper<E>, E>>>
operator| (E lhs, E rhs)
 
template<class E , class = std::enable_if_t<std::is_base_of_v<EnumSetHelper<E>, E>>>
E & operator|= (E &lhs, E rhs)
 
template<typename U , typename CF , typename DF >
auto virt::meta::light::wrap_oparm_owning_fill_static_arr (U underlying, CF &&count_fcn, DF &&data_fcn)
 
template<typename U , typename CF , typename DF >
auto virt::meta::light::wrap_oparm_owning_fill_freeable_arr (U underlying, CF count_fcn, DF data_fcn)
 
template<typename Conv = void, typename U , typename CF , typename DF , typename... DF_Args>
auto virt::meta::light::wrap_oparm_owning_fill_autodestroyable_arr (U underlying, CF count_fcn, DF data_fcn, DF_Args...df_args)
 
template<typename Wrap , template< class, class > typename Span = UniqueSpan, void(*)(Wrap *) dtroy = std::destroy_at<Wrap>, typename U , typename DataFRet , typename T , typename... DataFArgs>
decltype(auto) virt::meta::light::wrap_opram_owning_set_destroyable_arr (U underlying, DataFRet(*data_fcn)(U, T **, DataFArgs...), DataFArgs...data_f_args)
 
template<typename Conv = void, typename U , typename CountFRet , typename DataFRet , typename T >
auto virt::meta::heavy::wrap_oparm_owning_fill_static_arr (U underlying, CountFRet(*count_fcn)(U), DataFRet(*data_fcn)(U, T *, CountFRet))
 
template<typename Conv = void, typename U , typename CF , typename DF >
auto virt::meta::heavy::wrap_oparm_owning_fill_freeable_arr (U underlying, CF count_fcn, DF data_fcn)
 
template<typename Conv = void, typename U , typename CF , typename DF >
auto virt::meta::heavy::wrap_oparm_owning_fill_autodestroyable_arr (U underlying, CF count_fcn, DF data_fcn)
 
template<typename Wrap = void, typename U , typename DataFRet , typename T , typename... DataFArgs>
auto virt::meta::heavy::wrap_opram_owning_set_destroyable_arr (U underlying, DataFRet(*data_fcn)(U, T **, DataFArgs...), DataFArgs...data_f_args)
 
template<typename... T>
 Visitor (T...) -> Visitor< T... >
 

Macro Definition Documentation

#define UNREACHABLE

Typedef Documentation

template<typename T >
using passive = T
template<class OptT >
using RemoveOptional_t = typename RemoveOptional<OptT>::type

Function Documentation

template<typename T >
void freeany ( ptr)
inline
template<class E , class = std::enable_if_t<std::is_base_of_v<EnumSetHelper<E>, E>>>
E operator| ( lhs,
rhs 
)
template<class E , class = std::enable_if_t<std::is_base_of_v<EnumSetHelper<E>, E>>>
E& operator|= ( E &  lhs,
rhs 
)
template<class... Ts>
void sink ( Ts &&...  ts)
template<class Lambda , class... Ts>
constexpr auto test_sfinae ( Lambda  lambda,
Ts &&  ... 
) -> decltype(lambda(std::declval<Ts>()...), bool
constexpr bool test_sfinae (   ...)
template<typename E , std::enable_if_t< std::is_enum_v< E >, int > = 0>
decltype(auto) constexpr to_integral ( e)
inline
template<typename T , std::enable_if_t< std::is_integral_v< T >, int > = 0>
decltype(auto) constexpr to_integral ( v)
inline
template<typename T , typename V >
void visit ( T &&  t,
V &&  v 
)
template<typename T , typename V , size_t... I>
void visit_impl ( T &&  t,
V &&  v,
std::index_sequence< I... >   
)
template<typename... T>
Visitor ( T...  ) -> Visitor< T... >