WPILibC++ 2027.0.0-alpha-4
Loading...
Searching...
No Matches
wpi::util::details Namespace Reference

Classes

struct  HasContainerTraits
struct  HasContainerTraits< std::string >
struct  HasContainerTraits< std::string_view >
struct  HasContainerTraits< T, std::void_t< typename T::value_type, decltype(std::declval< T >().begin()), decltype(std::declval< T >().end()), decltype(std::declval< T >().size())> >
struct  HasStreamableTraits
struct  HasStreamableTraits< T, std::void_t< decltype(std::declval< std::ostream & >()<< std::declval< T >())> >
struct  ConsumeBinaryPrefixResult
struct  ConsumeHexPrefixResult
struct  parse_number
struct  parse_number< T, radix_2 >
struct  parse_number< T, radix_16 >
struct  parse_number< T >
struct  parse_number< T, chars_format::general >
struct  parse_number< T, chars_format::hex >
struct  parse_number< T, chars_format::binary >
struct  parse_number< T, chars_format::scientific >
struct  parse_number< T, chars_format::fixed >
struct  can_invoke_to_string
struct  IsChoiceTypeSupported

Enumerations

enum class  chars_format {
  scientific = 0xf1 , fixed = 0xf2 , hex = 0xf4 , binary = 0xf8 ,
  general = fixed | scientific
}

Functions

template<typename T>
std::string repr (T const &val)
template<class F, class Tuple, class Extra, std::size_t... I>
constexpr decltype(auto) apply_plus_one_impl (F &&f, Tuple &&t, Extra &&x, std::index_sequence< I... >)
template<class F, class Tuple, class Extra>
constexpr decltype(auto) apply_plus_one (F &&f, Tuple &&t, Extra &&x)
constexpr auto pointer_range (std::string_view s) noexcept
template<class CharT, class Traits>
constexpr bool starts_with (std::basic_string_view< CharT, Traits > prefix, std::basic_string_view< CharT, Traits > s) noexcept
constexpr auto consume_binary_prefix (std::string_view s) -> ConsumeBinaryPrefixResult
constexpr auto consume_hex_prefix (std::string_view s) -> ConsumeHexPrefixResult
template<class T, auto Param>
auto do_from_chars (std::string_view s) -> T
template<class T>
auto do_strtod (std::string const &s) -> T
template<typename StrIt>
std::string join (StrIt first, StrIt last, const std::string &separator)
template<typename StringType>
std::size_t get_levenshtein_distance (const StringType &s1, const StringType &s2)
template<typename ValueType>
std::string get_most_similar_string (const std::map< std::string, ValueType > &map, const std::string &input)

Variables

template<typename T>
constexpr bool IsContainer = HasContainerTraits<T>::value
template<typename T>
constexpr bool IsStreamable = HasStreamableTraits<T>::value
constexpr std::size_t repr_max_container_size = 5
constexpr int radix_2 = 2
constexpr int radix_8 = 8
constexpr int radix_10 = 10
constexpr int radix_16 = 16
template<typename T>
constexpr bool standard_integer

Enumeration Type Documentation

◆ chars_format

Enumerator
scientific 
fixed 
hex 
binary 
general 

Function Documentation

◆ apply_plus_one()

template<class F, class Tuple, class Extra>
decltype(auto) wpi::util::details::apply_plus_one ( F && f,
Tuple && t,
Extra && x )
constexpr

◆ apply_plus_one_impl()

template<class F, class Tuple, class Extra, std::size_t... I>
decltype(auto) wpi::util::details::apply_plus_one_impl ( F && f,
Tuple && t,
Extra && x,
std::index_sequence< I... >  )
constexpr

◆ consume_binary_prefix()

auto wpi::util::details::consume_binary_prefix ( std::string_view s) ->ConsumeBinaryPrefixResult
constexpr

◆ consume_hex_prefix()

auto wpi::util::details::consume_hex_prefix ( std::string_view s) ->ConsumeHexPrefixResult
constexpr

◆ do_from_chars()

template<class T, auto Param>
auto wpi::util::details::do_from_chars ( std::string_view s) ->T
inline

◆ do_strtod()

template<class T>
auto wpi::util::details::do_strtod ( std::string const & s) ->T
inline

◆ get_levenshtein_distance()

template<typename StringType>
std::size_t wpi::util::details::get_levenshtein_distance ( const StringType & s1,
const StringType & s2 )

◆ get_most_similar_string()

template<typename ValueType>
std::string wpi::util::details::get_most_similar_string ( const std::map< std::string, ValueType > & map,
const std::string & input )

◆ join()

template<typename StrIt>
std::string wpi::util::details::join ( StrIt first,
StrIt last,
const std::string & separator )

◆ pointer_range()

auto wpi::util::details::pointer_range ( std::string_view s)
constexprnoexcept

◆ repr()

template<typename T>
std::string wpi::util::details::repr ( T const & val)

◆ starts_with()

template<class CharT, class Traits>
bool wpi::util::details::starts_with ( std::basic_string_view< CharT, Traits > prefix,
std::basic_string_view< CharT, Traits > s )
constexprnoexcept

Variable Documentation

◆ IsContainer

template<typename T>
bool wpi::util::details::IsContainer = HasContainerTraits<T>::value
inlineconstexpr

◆ IsStreamable

template<typename T>
bool wpi::util::details::IsStreamable = HasStreamableTraits<T>::value
inlineconstexpr

◆ radix_10

int wpi::util::details::radix_10 = 10
constexpr

◆ radix_16

int wpi::util::details::radix_16 = 16
constexpr

◆ radix_2

int wpi::util::details::radix_2 = 2
constexpr

◆ radix_8

int wpi::util::details::radix_8 = 8
constexpr

◆ repr_max_container_size

std::size_t wpi::util::details::repr_max_container_size = 5
constexpr

◆ standard_integer

template<typename T>
bool wpi::util::details::standard_integer
constexpr
Initial value:
=
standard_signed_integer<T> || standard_unsigned_integer<T>