WPILibC++ 2024.1.1-beta-4
type_traits.h File Reference
#include <limits>
#include <type_traits>
#include <utility>
#include <tuple>
#include <wpi/detail/iterators/iterator_traits.h>
#include <wpi/detail/macro_scope.h>
#include <wpi/detail/meta/call_std/begin.h>
#include <wpi/detail/meta/call_std/end.h>
#include <wpi/detail/meta/cpp_future.h>
#include <wpi/detail/meta/detected.h>
#include <wpi/json_fwd.h>

Go to the source code of this file.

Classes

struct  detail::is_basic_json< typename >
 
struct  detail::is_basic_json< WPI_BASIC_JSON_TPL >
 
struct  detail::is_basic_json_context< BasicJsonContext >
 
struct  detail::is_json_ref< typename >
 
struct  detail::is_json_ref< json_ref< T > >
 
struct  detail::has_from_json< BasicJsonType, T, typename >
 
struct  detail::is_getable< BasicJsonType, T >
 
struct  detail::has_from_json< BasicJsonType, T, enable_if_t< !is_basic_json< T >::value > >
 
struct  detail::has_non_default_from_json< BasicJsonType, T, typename >
 
struct  detail::has_non_default_from_json< BasicJsonType, T, enable_if_t< !is_basic_json< T >::value > >
 
struct  detail::has_to_json< BasicJsonType, T, typename >
 
struct  detail::has_to_json< BasicJsonType, T, enable_if_t< !is_basic_json< T >::value > >
 
struct  detail::has_key_compare< T >
 
struct  detail::actual_object_comparator< BasicJsonType >
 
struct  detail::conjunction<... >
 
struct  detail::conjunction< B >
 
struct  detail::conjunction< B, Bn... >
 
struct  detail::negation< B >
 
struct  detail::is_default_constructible< T >
 
struct  detail::is_default_constructible< std::pair< T1, T2 > >
 
struct  detail::is_default_constructible< const std::pair< T1, T2 > >
 
struct  detail::is_default_constructible< std::tuple< Ts... > >
 
struct  detail::is_default_constructible< const std::tuple< Ts... > >
 
struct  detail::is_constructible< T, Args >
 
struct  detail::is_constructible< std::pair< T1, T2 > >
 
struct  detail::is_constructible< const std::pair< T1, T2 > >
 
struct  detail::is_constructible< std::tuple< Ts... > >
 
struct  detail::is_constructible< const std::tuple< Ts... > >
 
struct  detail::is_iterator_traits< T, typename >
 
struct  detail::is_iterator_traits< iterator_traits< T > >
 
struct  detail::is_range< T >
 
struct  detail::is_complete_type< T, typename >
 
struct  detail::is_complete_type< T, decltype(void(sizeof(T)))>
 
struct  detail::is_compatible_object_type_impl< BasicJsonType, CompatibleObjectType, typename >
 
struct  detail::is_compatible_object_type_impl< BasicJsonType, CompatibleObjectType, enable_if_t< is_detected< mapped_type_t, CompatibleObjectType >::value &&is_detected< key_type_t, CompatibleObjectType >::value > >
 
struct  detail::is_compatible_object_type< BasicJsonType, CompatibleObjectType >
 
struct  detail::is_constructible_object_type_impl< BasicJsonType, ConstructibleObjectType, typename >
 
struct  detail::is_constructible_object_type_impl< BasicJsonType, ConstructibleObjectType, enable_if_t< is_detected< mapped_type_t, ConstructibleObjectType >::value &&is_detected< key_type_t, ConstructibleObjectType >::value > >
 
struct  detail::is_constructible_object_type< BasicJsonType, ConstructibleObjectType >
 
struct  detail::is_compatible_string_type< BasicJsonType, CompatibleStringType >
 
struct  detail::is_constructible_string_type< BasicJsonType, ConstructibleStringType >
 
struct  detail::is_compatible_array_type_impl< BasicJsonType, CompatibleArrayType, typename >
 
struct  detail::is_compatible_array_type_impl< BasicJsonType, CompatibleArrayType, enable_if_t< is_detected< iterator_t, CompatibleArrayType >::value &&is_iterator_traits< iterator_traits< detected_t< iterator_t, CompatibleArrayType > > >::value &&!std::is_same< CompatibleArrayType, detected_t< range_value_t, CompatibleArrayType > >::value > >
 
struct  detail::is_compatible_array_type< BasicJsonType, CompatibleArrayType >
 
struct  detail::is_constructible_array_type_impl< BasicJsonType, ConstructibleArrayType, typename >
 
struct  detail::is_constructible_array_type_impl< BasicJsonType, ConstructibleArrayType, enable_if_t< std::is_same< ConstructibleArrayType, typename BasicJsonType::value_type >::value > >
 
struct  detail::is_constructible_array_type_impl< BasicJsonType, ConstructibleArrayType, enable_if_t< !std::is_same< ConstructibleArrayType, typename BasicJsonType::value_type >::value &&!is_compatible_string_type< BasicJsonType, ConstructibleArrayType >::value &&is_default_constructible< ConstructibleArrayType >::value &&(std::is_move_assignable< ConstructibleArrayType >::value||std::is_copy_assignable< ConstructibleArrayType >::value)&&is_detected< iterator_t, ConstructibleArrayType >::value &&is_iterator_traits< iterator_traits< detected_t< iterator_t, ConstructibleArrayType > > >::value &&is_detected< range_value_t, ConstructibleArrayType >::value &&!std::is_same< ConstructibleArrayType, detected_t< range_value_t, ConstructibleArrayType > >::value &&is_complete_type< detected_t< range_value_t, ConstructibleArrayType > >::value > >
 
struct  detail::is_constructible_array_type< BasicJsonType, ConstructibleArrayType >
 
struct  detail::is_compatible_integer_type_impl< RealIntegerType, CompatibleNumberIntegerType, typename >
 
struct  detail::is_compatible_integer_type_impl< RealIntegerType, CompatibleNumberIntegerType, enable_if_t< std::is_integral< RealIntegerType >::value &&std::is_integral< CompatibleNumberIntegerType >::value &&!std::is_same< bool, CompatibleNumberIntegerType >::value > >
 
struct  detail::is_compatible_integer_type< RealIntegerType, CompatibleNumberIntegerType >
 
struct  detail::is_compatible_type_impl< BasicJsonType, CompatibleType, typename >
 
struct  detail::is_compatible_type_impl< BasicJsonType, CompatibleType, enable_if_t< is_complete_type< CompatibleType >::value > >
 
struct  detail::is_compatible_type< BasicJsonType, CompatibleType >
 
struct  detail::is_constructible_tuple< T1, T2 >
 
struct  detail::is_constructible_tuple< T1, std::tuple< Args... > >
 
struct  detail::is_json_iterator_of< BasicJsonType, T >
 
struct  detail::is_json_iterator_of< BasicJsonType, typename BasicJsonType::iterator >
 
struct  detail::is_json_iterator_of< BasicJsonType, typename BasicJsonType::const_iterator >
 
struct  detail::is_specialization_of< Primary, T >
 
struct  detail::is_specialization_of< Primary, Primary< Args... > >
 
struct  detail::is_comparable< Compare, A, B, typename >
 
struct  detail::is_comparable< Compare, A, B, void_t< decltype(std::declval< Compare >()(std::declval< A >(), std::declval< B >())), decltype(std::declval< Compare >()(std::declval< B >(), std::declval< A >()))> >
 
struct  detail::is_ordered_map< T >
 
struct  detail::is_ordered_map< T >::two
 
struct  detail::value_in_range_of_impl2< OfType, T, false, false >
 
struct  detail::value_in_range_of_impl2< OfType, T, true, false >
 
struct  detail::value_in_range_of_impl2< OfType, T, false, true >
 
struct  detail::value_in_range_of_impl2< OfType, T, true, true >
 
struct  detail::value_in_range_of_impl1< OfType, T, false >
 
struct  detail::value_in_range_of_impl1< OfType, T, true >
 
struct  detail::is_c_string< T >
 
struct  detail::is_transparent< T >
 

Namespaces

namespace  detail
 detail namespace with internal helper functions
 
namespace  detail::impl
 

Typedefs

template<typename T >
using detail::mapped_type_t = typename T::mapped_type
 
template<typename T >
using detail::key_type_t = typename T::key_type
 
template<typename T >
using detail::value_type_t = typename T::value_type
 
template<typename T >
using detail::difference_type_t = typename T::difference_type
 
template<typename T >
using detail::pointer_t = typename T::pointer
 
template<typename T >
using detail::reference_t = typename T::reference
 
template<typename T >
using detail::iterator_category_t = typename T::iterator_category
 
template<typename T , typename... Args>
using detail::to_json_function = decltype(T::to_json(std::declval< Args >()...))
 
template<typename T , typename... Args>
using detail::from_json_function = decltype(T::from_json(std::declval< Args >()...))
 
template<typename T , typename U >
using detail::get_template_function = decltype(std::declval< T >().template get< U >())
 
template<typename T >
using detail::detect_key_compare = typename T::key_compare
 
template<typename BasicJsonType >
using detail::actual_object_comparator_t = typename actual_object_comparator< BasicJsonType >::type
 
template<typename T >
using detail::range_value_t = value_type_t< iterator_traits< iterator_t< T > > >
 
template<typename T >
using detail::is_json_pointer = is_specialization_of<::wpi::json_pointer, uncvref_t< T > >
 
template<typename T >
using detail::detect_is_transparent = typename T::is_transparent
 
template<typename Comparator , typename ObjectKeyType , typename KeyTypeCVRef , bool RequireTransparentComparator = true, bool ExcludeObjectKeyType = RequireTransparentComparator, typename KeyType = uncvref_t<KeyTypeCVRef>>
using detail::is_usable_as_key_type = typename std::conditional< is_comparable< Comparator, ObjectKeyType, KeyTypeCVRef >::value &&!(ExcludeObjectKeyType &&std::is_same< KeyType, ObjectKeyType >::value) &&(!RequireTransparentComparator||is_detected< detect_is_transparent, Comparator >::value) &&!is_json_pointer< KeyType >::value, std::true_type, std::false_type >::type
 
template<typename BasicJsonType , typename KeyTypeCVRef , bool RequireTransparentComparator = true, bool ExcludeObjectKeyType = RequireTransparentComparator, typename KeyType = uncvref_t<KeyTypeCVRef>>
using detail::is_usable_as_basic_json_key_type = typename std::conditional< is_usable_as_key_type< typename BasicJsonType::object_comparator_t, typename BasicJsonType::object_t::key_type, KeyTypeCVRef, RequireTransparentComparator, ExcludeObjectKeyType >::value &&!is_json_iterator_of< BasicJsonType, KeyType >::value, std::true_type, std::false_type >::type
 
template<typename ObjectType , typename KeyType >
using detail::detect_erase_with_key_type = decltype(std::declval< ObjectType & >().erase(std::declval< KeyType >()))
 
template<typename BasicJsonType , typename KeyType >
using detail::has_erase_with_key_type = typename std::conditional< is_detected< detect_erase_with_key_type, typename BasicJsonType::object_t, KeyType >::value, std::true_type, std::false_type >::type
 
template<typename... Types>
using detail::all_integral = conjunction< std::is_integral< Types >... >
 
template<typename... Types>
using detail::all_signed = conjunction< std::is_signed< Types >... >
 
template<typename... Types>
using detail::all_unsigned = conjunction< std::is_unsigned< Types >... >
 
template<typename... Types>
using detail::same_sign = std::integral_constant< bool, all_signed< Types... >::value||all_unsigned< Types... >::value >
 
template<typename OfType , typename T >
using detail::never_out_of_range = std::integral_constant< bool,(std::is_signed< OfType >::value &&(sizeof(T)< sizeof(OfType)))||(same_sign< OfType, T >::value &&sizeof(OfType)==sizeof(T)) >
 
template<bool Value>
using detail::bool_constant = std::integral_constant< bool, Value >
 
template<typename T >
using detail::is_c_string_uncvref = is_c_string< uncvref_t< T > >
 

Functions

template<typename T , typename U , enable_if_t< !std::is_same< T, U >::value, int > = 0>
detail::conditional_static_cast (U value)
 
template<typename OfType , typename T >
constexpr bool detail::value_in_range_of (T val)
 
template<typename T >
constexpr bool detail::impl::is_c_string ()
 
template<typename T >
constexpr bool detail::impl::is_transparent ()