ICU4X
International Components for Unicode
Loading...
Searching...
No Matches
diplomat Namespace Reference

Classes

struct  as_ffi
 
struct  as_ffi< T, std::void_t< decltype(std::declval< std::remove_pointer_t< T > >().AsFFI())> >
 
struct  Err
 
struct  fn_traits
 
struct  fn_traits< std::function< Ret(Args...)> >
 
struct  has_next
 
struct  has_next< T, std::void_t< decltype(std::declval< T >().next())> >
 
struct  inner
 
struct  inner< std::optional< T > >
 
struct  inner< std::unique_ptr< T > >
 
struct  next_to_iter_helper
 Helper template enabling native iteration over unique ptrs to objects which implement next() More...
 
struct  Ok
 
class  result
 
class  span
 
class  Utf8Error
 

Typedefs

template<typename T>
using as_ffi_t = typename as_ffi<T>::type
 
template<typename T>
using replace_string_view_t = std::conditional_t<std::is_same_v<T, std::string_view>, capi::DiplomatStringView, T>
 
template<typename T>
using replace_ref_with_ptr_t = std::conditional_t<std::is_reference_v<T>, std::add_pointer_t<std::remove_reference_t<T>>, T>
 
template<typename T>
using replace_fn_t = replace_string_view_t<as_ffi_t<T>>
 Replace the argument types from the std::function with the argument types for th function pointer.
 

Functions

template<class T>
 fn_traits (T) -> fn_traits< T >
 
template<typename T, typename U = typename inner<T>::type>
const U get_inner_if_present (T v)
 

Variables

constexpr size_t dynamic_extent = std::numeric_limits<std::size_t>::max()
 
template<typename T>
constexpr bool has_next_v = has_next<T>::value
 

Typedef Documentation

◆ as_ffi_t

template<typename T>
using diplomat::as_ffi_t = typename as_ffi<T>::type

◆ replace_fn_t

template<typename T>
using diplomat::replace_fn_t = replace_string_view_t<as_ffi_t<T>>

Replace the argument types from the std::function with the argument types for th function pointer.

◆ replace_ref_with_ptr_t

template<typename T>
using diplomat::replace_ref_with_ptr_t = std::conditional_t<std::is_reference_v<T>, std::add_pointer_t<std::remove_reference_t<T>>, T>

◆ replace_string_view_t

template<typename T>
using diplomat::replace_string_view_t = std::conditional_t<std::is_same_v<T, std::string_view>, capi::DiplomatStringView, T>

Function Documentation

◆ fn_traits()

template<class T>
diplomat::fn_traits ( T ) -> fn_traits< T >

◆ get_inner_if_present()

template<typename T, typename U = typename inner<T>::type>
const U diplomat::get_inner_if_present ( T v)
inline

Variable Documentation

◆ dynamic_extent

size_t diplomat::dynamic_extent = std::numeric_limits<std::size_t>::max()
constexpr

◆ has_next_v

template<typename T>
bool diplomat::has_next_v = has_next<T>::value
constexpr