vari
Loading...
Searching...
No Matches
vari Namespace Reference

MIT License. More...

Classes

class  _uvptr
 A nullable owning pointer to one of the types in Ts... More...
 
class  _uvref
 A non-nullable owning pointer to one of the types in Ts... More...
 
class  _vptr
 A nullable pointer to one of the types in Ts... More...
 
class  _vref
 A non-nullable pointer to one of the types in Ts... More...
 
struct  def_del
 Default library deleter. More...
 

Typedefs

template<template< typename... > typename T, typename TL , typename... Extra>
using _define_variadic = _vptr_apply_t< T, unique_typelist_t< flatten_t< TL > >, Extra... >
 Given a templated type T and typelist of types TL, aliases T<Us...> where Us... is flattend version of TL without any duplicates. More...
 
template<typename... Ts>
using uvptr = _define_variadic< _uvptr, typelist< Ts... >, def_del >
 A nullable owning pointer to types derived out of Ts... list by flattening it and filtering for unique types.
 
template<typename... Ts>
using uvref = _define_variadic< _uvref, typelist< Ts... >, def_del >
 A non-nullable owning pointer to types derived out of Ts... list by flattening it and filtering for unique types.
 
template<typename... Ts>
using vptr = _define_variadic< _vptr, typelist< Ts... > >
 A nullable pointer to types derived out of Ts... list by flattening it and filtering for unique types.
 
template<typename... Ts>
using vref = _define_variadic< _vref, typelist< Ts... > >
 A non-nullable pointer to types derived out of Ts... list by flattening it and filtering for unique types.
 

Functions

template<typename... Lhs, typename... Rhs>
constexpr auto operator<=> (_uvptr< Lhs... > const &lh, _uvptr< Rhs... > const &rh) noexcept
 Compares the internal pointers of both pointers.
 
template<typename... Lhs, typename... Rhs>
constexpr auto operator<=> (_uvref< Lhs... > const &lh, _uvref< Rhs... > const &rh) noexcept
 Compares the internal pointers of both references.
 
template<typename... Lhs, typename... Rhs>
constexpr auto operator<=> (_vptr< Lhs... > const &lh, _vptr< Rhs... > const &rh) noexcept
 Compares the internal pointers of both pointers.
 
template<typename... Lhs, typename... Rhs>
constexpr auto operator<=> (_vref< Lhs... > const &lh, _vref< Rhs... > const &rh) noexcept
 Compares the internal pointers of both references.
 
template<typename... Lhs, typename... Rhs>
constexpr bool operator== (_uvptr< Lhs... > const &lh, _uvptr< Rhs... > const &rh) noexcept
 Compares the internal pointers of both pointers.
 
template<typename... Lhs, typename... Rhs>
constexpr bool operator== (_uvref< Lhs... > const &lh, _uvref< Rhs... > const &rh) noexcept
 Compares the internal pointers of both references.
 
template<typename... Lhs, typename... Rhs>
constexpr bool operator== (_vptr< Lhs... > const &lh, _vptr< Rhs... > const &rh) noexcept
 Compares the internal pointers of both pointers.
 
template<typename... Lhs, typename... Rhs>
constexpr bool operator== (_vref< Lhs... > const &lh, _vref< Rhs... > const &rh) noexcept
 Compares the internal pointers of both references.
 
template<typename T >
constexpr uvref< T > uwrap (T item)
 Wraps object item into uvref of its type.
 
template<typename R , typename Del , typename... Ts>
requires ( std::convertible_to< Ts&, R > && ... )
vcast (vari::_uvref< Del, Ts... > const &r)
 Applies static cast to R to item currently owned by uvref
 
template<typename R , typename... Ts>
requires ( std::convertible_to< Ts&, R > && ... )
vcast (vari::_vref< Ts... > const &r)
 Applies static cast to R to item currently referenced by vref
 

Detailed Description

MIT License.

Copyright (c) 2025 koniarik

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Copyright (c) 2025 koniarik

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Typedef Documentation

◆ _define_variadic

template<template< typename... > typename T, typename TL , typename... Extra>
using vari::_define_variadic = typedef _vptr_apply_t< T, unique_typelist_t< flatten_t< TL > >, Extra... >

Given a templated type T and typelist of types TL, aliases T<Us...> where Us... is flattend version of TL without any duplicates.

If Extra... list is provided, it is appended before Us...: T<Extra...,Us...>