SimulationCraft
SimulationCraft is a tool to explore combat mechanics in the popular MMO RPG World of Warcraft (tm).
arg_mapper< Context > Struct Template Reference

Classes

struct  formattable
 

Public Types

using char_type = typename Context::char_type
 
using cstring_result = conditional_t< std::is_same< char_type, char >::value, const char *, unformattable_pointer >
 

Public Member Functions

FMT_CONSTEXPR FMT_INLINE auto map (signed char val) -> int
 
FMT_CONSTEXPR FMT_INLINE auto map (unsigned char val) -> unsigned
 
FMT_CONSTEXPR FMT_INLINE auto map (short val) -> int
 
FMT_CONSTEXPR FMT_INLINE auto map (unsigned short val) -> unsigned
 
FMT_CONSTEXPR FMT_INLINE auto map (int val) -> int
 
FMT_CONSTEXPR FMT_INLINE auto map (unsigned val) -> unsigned
 
FMT_CONSTEXPR FMT_INLINE auto map (long val) -> long_type
 
FMT_CONSTEXPR FMT_INLINE auto map (unsigned long val) -> ulong_type
 
FMT_CONSTEXPR FMT_INLINE auto map (long long val) -> long long
 
FMT_CONSTEXPR FMT_INLINE auto map (unsigned long long val) -> unsigned long long
 
FMT_CONSTEXPR FMT_INLINE auto map (int128_t val) -> int128_t
 
FMT_CONSTEXPR FMT_INLINE auto map (uint128_t val) -> uint128_t
 
FMT_CONSTEXPR FMT_INLINE auto map (bool val) -> bool
 
template<typename T , FMT_ENABLE_IF(std::is_same< T, char >::value|| std::is_same< T, char_type >::value) >
FMT_CONSTEXPR FMT_INLINE auto map (T val) -> char_type
 
template<typename T , enable_if_t<(std::is_same< T, wchar_t >::value||std::is_same< T, char16_t >::value||std::is_same< T, char32_t >::value) &&!std::is_same< T, char_type >::value, int > = 0>
FMT_CONSTEXPR FMT_INLINE auto map (T) -> unformattable_char
 
FMT_CONSTEXPR FMT_INLINE auto map (float val) -> float
 
FMT_CONSTEXPR FMT_INLINE auto map (double val) -> double
 
FMT_CONSTEXPR FMT_INLINE auto map (long double val) -> long double
 
FMT_CONSTEXPR FMT_INLINE auto map (char_type *val) -> const char_type *
 
FMT_CONSTEXPR FMT_INLINE auto map (const char_type *val) -> const char_type *
 
template<typename T , FMT_ENABLE_IF(is_string< T >::value &&!std::is_pointer< T >::value && std::is_same< char_type, char_t< T >>::value) >
FMT_CONSTEXPR FMT_INLINE auto map (const T &val) -> basic_string_view< char_type >
 
template<typename T , FMT_ENABLE_IF(is_string< T >::value &&!std::is_pointer< T >::value && !std::is_same< char_type, char_t< T >>::value) >
FMT_CONSTEXPR FMT_INLINE auto map (const T &) -> unformattable_char
 
template<typename T , FMT_ENABLE_IF( std::is_constructible< basic_string_view< char_type >, T >::value && !is_string< T >::value &&!has_formatter< T, Context >::value && !has_fallback_formatter< T, char_type >::value) >
FMT_CONSTEXPR FMT_INLINE auto map (const T &val) -> basic_string_view< char_type >
 
template<typename T , FMT_ENABLE_IF( std::is_constructible< std_string_view< char_type >, T >::value && !std::is_constructible< basic_string_view< char_type >, T >::value && !is_string< T >::value &&!has_formatter< T, Context >::value && !has_fallback_formatter< T, char_type >::value) >
FMT_CONSTEXPR FMT_INLINE auto map (const T &val) -> basic_string_view< char_type >
 
FMT_DEPRECATED FMT_CONSTEXPR FMT_INLINE auto map (const signed char *val) -> cstring_result
 
FMT_DEPRECATED FMT_CONSTEXPR FMT_INLINE auto map (const unsigned char *val) -> cstring_result
 
FMT_DEPRECATED FMT_CONSTEXPR FMT_INLINE auto map (signed char *val) -> cstring_result
 
FMT_DEPRECATED FMT_CONSTEXPR FMT_INLINE auto map (unsigned char *val) -> cstring_result
 
FMT_CONSTEXPR FMT_INLINE auto map (void *val) -> const void *
 
FMT_CONSTEXPR FMT_INLINE auto map (const void *val) -> const void *
 
FMT_CONSTEXPR FMT_INLINE auto map (std::nullptr_t val) -> const void *
 
template<typename T , FMT_ENABLE_IF( std::is_member_pointer< T >::value|| std::is_function< typename std::remove_pointer< T >::type >::value||(std::is_convertible< const T &, const void * >::value && !std::is_convertible< const T &, const char_type * >::value)) >
FMT_CONSTEXPR auto map (const T &) -> unformattable_pointer
 
template<typename T , std::size_t N, FMT_ENABLE_IF(!std::is_same< T, wchar_t >::value) >
FMT_CONSTEXPR FMT_INLINE auto map (const T(&values)[N]) -> const T(&)[N]
 
template<typename T , FMT_ENABLE_IF( std::is_enum< T >::value &&std::is_convertible< T, int >::value && !has_formatter< T, Context >::value && !has_fallback_formatter< T, char_type >::value) >
FMT_CONSTEXPR FMT_INLINE auto map (const T &val) -> decltype(std::declval< arg_mapper >().map(static_cast< typename std::underlying_type< T >::type >(val)))
 
FMT_CONSTEXPR FMT_INLINE auto map (detail::byte val) -> unsigned
 
template<typename T , FMT_ENABLE_IF(formattable< T >::value) >
FMT_CONSTEXPR FMT_INLINE auto do_map (T &&val) -> T &
 
template<typename T , FMT_ENABLE_IF(!formattable< T >::value) >
FMT_CONSTEXPR FMT_INLINE auto do_map (T &&) -> unformattable_const
 
template<typename T , typename U = remove_cvref_t<T>, FMT_ENABLE_IF(!is_string< U >::value &&!is_char< U >::value && !std::is_array< U >::value &&(has_formatter< U, Context >::value|| has_fallback_formatter< U, char_type >::value)) >
FMT_CONSTEXPR FMT_INLINE auto map (T &&val) -> decltype(this->do_map(std::forward< T >(val)))
 
template<typename T , FMT_ENABLE_IF(is_named_arg< T >::value) >
FMT_CONSTEXPR FMT_INLINE auto map (const T &named_arg) -> decltype(std::declval< arg_mapper >().map(named_arg.value))
 
auto map (...) -> unformattable