WPILibC++ 2023.4.3-108-ge5452e3
wpi::sig::trait Namespace Reference

Namespaces

namespace  detail
 

Classes

struct  typelist
 represent a list of types More...
 

Functions

template<typename T >
std::weak_ptr< T > to_weak (std::weak_ptr< T > w)
 Pointers that can be converted to a weak pointer concept for tracking purpose must implement the to_weak() function in order to make use of ADL to convert that type and make it usable. More...
 
template<typename T >
std::weak_ptr< T > to_weak (std::shared_ptr< T > s)
 

Variables

template<typename P >
constexpr bool is_weak_ptr_compatible_v = detail::is_weak_ptr_compatible<std::decay_t<P>>::value
 determine if a pointer is convertible into a "weak" pointer More...
 
template<typename L , typename... T>
constexpr bool is_callable_v = detail::is_callable<T..., L>::value
 determine if a type T (Callable or Pmf) is callable with supplied arguments in L More...
 

Function Documentation

◆ to_weak() [1/2]

template<typename T >
std::weak_ptr< T > wpi::sig::trait::to_weak ( std::shared_ptr< T >  s)

◆ to_weak() [2/2]

template<typename T >
std::weak_ptr< T > wpi::sig::trait::to_weak ( std::weak_ptr< T >  w)

Pointers that can be converted to a weak pointer concept for tracking purpose must implement the to_weak() function in order to make use of ADL to convert that type and make it usable.

Variable Documentation

◆ is_callable_v

template<typename L , typename... T>
constexpr bool wpi::sig::trait::is_callable_v = detail::is_callable<T..., L>::value
constexpr

determine if a type T (Callable or Pmf) is callable with supplied arguments in L

◆ is_weak_ptr_compatible_v

template<typename P >
constexpr bool wpi::sig::trait::is_weak_ptr_compatible_v = detail::is_weak_ptr_compatible<std::decay_t<P>>::value
constexpr

determine if a pointer is convertible into a "weak" pointer