57template<
typename BasicJsonContext>
59 std::integral_constant < bool,
60 is_basic_json<typename std::remove_cv<typename std::remove_pointer<BasicJsonContext>::type>::type>::value
61 || std::is_same<BasicJsonContext, std::nullptr_t>::value >
102template<
typename T,
typename... Args>
105template<
typename T,
typename... Args>
108template<
typename T,
typename U>
112template<
typename BasicJsonType,
typename T,
typename =
void>
119template <
typename BasicJsonType,
typename T>
125template<
typename BasicJsonType,
typename T>
128 using serializer =
typename BasicJsonType::template json_serializer<T, void>;
132 const BasicJsonType&, T&>::value;
137template<
typename BasicJsonType,
typename T,
typename =
void>
140template<
typename BasicJsonType,
typename T>
143 using serializer =
typename BasicJsonType::template json_serializer<T, void>;
147 const BasicJsonType&>::value;
152template<
typename BasicJsonType,
typename T,
typename =
void>
155template<
typename BasicJsonType,
typename T>
158 using serializer =
typename BasicJsonType::template json_serializer<T, void>;
169struct has_key_compare : std::integral_constant<bool, is_detected<detect_key_compare, T>::value> {};
172template<
typename BasicJsonType>
177 using type =
typename std::conditional < has_key_compare<object_t>::value,
181template<
typename BasicJsonType>
191template<
class B,
class... Bn>
193: std::conditional<static_cast<bool>(B::value), conjunction<Bn...>, B>
::type {};
196template<
class B>
struct negation : std::integral_constant < bool, !B::value > { };
204template <
typename T1,
typename T2>
206 :
conjunction<is_default_constructible<T1>, is_default_constructible<T2>> {};
208template <
typename T1,
typename T2>
210 :
conjunction<is_default_constructible<T1>, is_default_constructible<T2>> {};
212template <
typename... Ts>
216template <
typename... Ts>
221template <
typename T,
typename... Args>
224template <
typename T1,
typename T2>
227template <
typename T1,
typename T2>
230template <
typename... Ts>
233template <
typename... Ts>
237template<
typename T,
typename =
void>
267 static constexpr auto is_iterator_begin =
271 static constexpr bool value = !std::is_same<iterator, nonesuch>::value && !std::is_same<sentinel, nonesuch>::value && is_iterator_begin;
284template<
typename T,
typename =
void>
290template<
typename BasicJsonType,
typename CompatibleObjectType,
294template<
typename BasicJsonType,
typename CompatibleObjectType>
296 BasicJsonType, CompatibleObjectType,
298 is_detected<key_type_t, CompatibleObjectType>::value >>
305 typename CompatibleObjectType::key_type>::value &&
307 typename CompatibleObjectType::mapped_type>::value;
310template<
typename BasicJsonType,
typename CompatibleObjectType>
314template<
typename BasicJsonType,
typename ConstructibleObjectType,
318template<
typename BasicJsonType,
typename ConstructibleObjectType>
320 BasicJsonType, ConstructibleObjectType,
322 is_detected<key_type_t, ConstructibleObjectType>::value >>
328 (std::is_move_assignable<ConstructibleObjectType>::value ||
329 std::is_copy_assignable<ConstructibleObjectType>::value) &&
331 typename object_t::key_type>::value &&
333 typename object_t::mapped_type,
334 typename ConstructibleObjectType::mapped_type >::value)) ||
336 typename ConstructibleObjectType::mapped_type>::value ||
339 typename ConstructibleObjectType::mapped_type >::value);
342template<
typename BasicJsonType,
typename ConstructibleObjectType>
345 ConstructibleObjectType> {};
347template<
typename BasicJsonType,
typename CompatibleStringType>
354template<
typename BasicJsonType,
typename ConstructibleStringType>
358#ifdef __INTEL_COMPILER
359 using laundered_type =
decltype(std::declval<ConstructibleStringType>());
371template<
typename BasicJsonType,
typename CompatibleArrayType,
typename =
void>
374template<
typename BasicJsonType,
typename CompatibleArrayType>
376 BasicJsonType, CompatibleArrayType,
379 is_iterator_traits<iterator_traits<detected_t<iterator_t, CompatibleArrayType>>>::value&&
382 !std::is_same<CompatibleArrayType, detected_t<range_value_t, CompatibleArrayType>>::value >>
389template<
typename BasicJsonType,
typename CompatibleArrayType>
393template<
typename BasicJsonType,
typename ConstructibleArrayType,
typename =
void>
396template<
typename BasicJsonType,
typename ConstructibleArrayType>
398 BasicJsonType, ConstructibleArrayType,
400 typename BasicJsonType::value_type>::value >>
403template<
typename BasicJsonType,
typename ConstructibleArrayType>
405 BasicJsonType, ConstructibleArrayType,
407 typename BasicJsonType::value_type>::value&&
410(std::is_move_assignable<ConstructibleArrayType>::value ||
411 std::is_copy_assignable<ConstructibleArrayType>::value)&&
412is_detected<iterator_t, ConstructibleArrayType>::value&&
413is_iterator_traits<iterator_traits<detected_t<iterator_t, ConstructibleArrayType>>>::value&&
414is_detected<range_value_t, ConstructibleArrayType>::value&&
417!std::is_same<ConstructibleArrayType, detected_t<range_value_t, ConstructibleArrayType>>::value&&
419 detected_t<range_value_t, ConstructibleArrayType >>::value >>
425 typename BasicJsonType::array_t::value_type>::value ||
433template<
typename BasicJsonType,
typename ConstructibleArrayType>
437template<
typename RealIntegerType,
typename CompatibleNumberIntegerType,
441template<
typename RealIntegerType,
typename CompatibleNumberIntegerType>
443 RealIntegerType, CompatibleNumberIntegerType,
445 std::is_integral<CompatibleNumberIntegerType>::value&&
446 !std::is_same<bool, CompatibleNumberIntegerType>::value >>
454 CompatibleNumberIntegerType>::value &&
459template<
typename RealIntegerType,
typename CompatibleNumberIntegerType>
462 CompatibleNumberIntegerType> {};
464template<
typename BasicJsonType,
typename CompatibleType,
typename =
void>
467template<
typename BasicJsonType,
typename CompatibleType>
469 BasicJsonType, CompatibleType,
476template<
typename BasicJsonType,
typename CompatibleType>
480template<
typename T1,
typename T2>
483template<
typename T1,
typename... Args>
486template<
typename BasicJsonType,
typename T>
489template<
typename BasicJsonType>
492template<
typename BasicJsonType>
497template<
template <
typename...>
class Primary,
typename T>
500template<
template <
typename...>
class Primary,
typename... Args>
507template<
typename Compare,
typename A,
typename B,
typename =
void>
510template<
typename Compare,
typename A,
typename B>
512decltype(
std::declval<Compare>()(std::declval<A>(), std::declval<B>())),
513decltype(std::declval<Compare>()(std::declval<B>(), std::declval<A>()))
514>> : std::true_type {};
521template<
typename Comparator,
typename ObjectKeyType,
typename KeyTypeCVRef,
bool RequireTransparentComparator =
true,
525 && !(ExcludeObjectKeyType && std::is_same<KeyType,
526 ObjectKeyType>::value)
527 && (!RequireTransparentComparator
539template<
typename BasicJsonType,
typename KeyTypeCVRef,
bool RequireTransparentComparator =
true,
543 typename BasicJsonType::object_t::key_type, KeyTypeCVRef,
544 RequireTransparentComparator, ExcludeObjectKeyType>::value
549template<
typename ObjectType,
typename KeyType>
553template<
typename BasicJsonType,
typename KeyType>
557 typename BasicJsonType::object_t, KeyType >::value,
573 template <
typename C>
static one test(
decltype(&C::capacity) ) ;
576 enum {
value =
sizeof(test<T>(
nullptr)) ==
sizeof(
char) };
580template < typename T, typename U, enable_if_t < !std::is_same<T, U>::value,
int > = 0 >
583 return static_cast<T
>(
value);
586template<typename T, typename U, enable_if_t<std::is_same<T, U>::value,
int> = 0>
592template<
typename... Types>
595template<
typename... Types>
598template<
typename... Types>
602template<
typename... Types>
606template<
typename OfType,
typename T>
608 (std::is_signed<OfType>::value && (
sizeof(T) <
sizeof(OfType)))
611template<
typename OfType,
typename T,
612 bool OfTypeSigned = std::is_signed<OfType>::value,
613 bool TSigned = std::is_signed<T>::value>
616template<
typename OfType,
typename T>
619 static constexpr bool test(T val)
626template<
typename OfType,
typename T>
629 static constexpr bool test(T val)
636template<
typename OfType,
typename T>
639 static constexpr bool test(T val)
647template<
typename OfType,
typename T>
650 static constexpr bool test(T val)
658template<
typename OfType,
typename T,
659 bool NeverOutOfRange = never_out_of_range<OfType, T>::value,
663template<
typename OfType,
typename T>
666 static constexpr bool test(T val)
672template<
typename OfType,
typename T>
681template<
typename OfType,
typename T>
705 (std::is_array<T>::value && std::is_same<TUnCVExt, char>::value)
706 || (std::is_pointer<T>::value && std::is_same<TUnCVPtr, char>::value);
#define WPI_JSON_NAMESPACE_END
Definition: abi_macros.h:59
#define WPI_JSON_NAMESPACE_BEGIN
Definition: abi_macros.h:53
Definition: json_ref.h:23
#define WPI_BASIC_JSON_TPL_DECLARATION
Definition: macro_scope.h:236
#define WPI_BASIC_JSON_TPL
Definition: macro_scope.h:245
constexpr bool is_transparent()
Definition: type_traits.h:726
constexpr bool is_c_string()
Definition: type_traits.h:698
detail namespace with internal helper functions
Definition: xchar.h:20
std::is_same< Expected, detected_t< Op, Args... > > is_detected_exact
Definition: detected.h:63
void void_t
Definition: core.h:1510
std::integral_constant< bool, std::numeric_limits< T >::is_signed||std::is_same< T, int128_opt >::value > is_signed
Definition: format.h:811
decltype(T::to_json(std::declval< Args >()...)) to_json_function
Definition: type_traits.h:103
decltype(std::declval< T >().template get< U >()) get_template_function
Definition: type_traits.h:109
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 is_usable_as_basic_json_key_type
Definition: type_traits.h:547
typename T::pointer pointer_t
Definition: type_traits.h:94
typename T::value_type value_type_t
Definition: type_traits.h:88
T conditional_static_cast(U value)
Definition: type_traits.h:581
typename std::enable_if< B, T >::type enable_if_t
Definition: cpp_future.h:38
typename T::mapped_type mapped_type_t
Definition: type_traits.h:82
decltype(std::begin(std::declval< T & >())) iterator_t
Definition: format.h:551
decltype(T::from_json(std::declval< Args >()...)) from_json_function
Definition: type_traits.h:106
std::integral_constant< bool, Value > bool_constant
Definition: type_traits.h:688
typename T::key_type key_type_t
Definition: type_traits.h:85
constexpr bool value_in_range_of(T val)
Definition: type_traits.h:682
std::integral_constant< bool, all_signed< Types... >::value||all_unsigned< Types... >::value > same_sign
Definition: type_traits.h:604
typename detector< nonesuch, void, Op, Args... >::type detected_t
Definition: detected.h:54
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 is_usable_as_key_type
Definition: type_traits.h:531
typename T::iterator_category iterator_category_t
Definition: type_traits.h:100
typename std::conditional< is_detected< detect_erase_with_key_type, typename BasicJsonType::object_t, KeyType >::value, std::true_type, std::false_type >::type has_erase_with_key_type
Definition: type_traits.h:559
value_type_t< iterator_traits< iterator_t< T > > > range_value_t
Definition: type_traits.h:278
typename actual_object_comparator< BasicJsonType >::type actual_object_comparator_t
Definition: type_traits.h:182
type
Definition: core.h:556
typename T::difference_type difference_type_t
Definition: type_traits.h:91
typename std::remove_cv< typename std::remove_reference< T >::type >::type uncvref_t
Definition: cpp_future.h:24
typename T::is_transparent detect_is_transparent
Definition: type_traits.h:517
typename T::reference reference_t
Definition: type_traits.h:97
bool_constant< is_integral< T >::value &&!std::is_same< T, bool >::value &&!std::is_same< T, char >::value &&!std::is_same< T, wchar_t >::value > is_integer
Definition: format.h:817
decltype(std::declval< ObjectType & >().erase(std::declval< KeyType >())) detect_erase_with_key_type
Definition: type_traits.h:550
typename T::key_compare detect_key_compare
Definition: type_traits.h:166
typename detector< nonesuch, void, Op, Args... >::value_t is_detected
Definition: detected.h:48
std::integral_constant< bool,(std::is_signed< OfType >::value &&(sizeof(T)< sizeof(OfType)))||(same_sign< OfType, T >::value &&sizeof(OfType)==sizeof(T)) > never_out_of_range
Definition: type_traits.h:609
WPILIB_DLLEXPORT void from_json(const wpi::json &json, AprilTagFieldLayout &layout)
WPILIB_DLLEXPORT void to_json(wpi::json &json, const AprilTagFieldLayout &layout)
UnitTypeLhs() max(const UnitTypeLhs &lhs, const UnitTypeRhs &rhs)
Definition: base.h:3417
UnitTypeLhs() min(const UnitTypeLhs &lhs, const UnitTypeRhs &rhs)
Definition: base.h:3409
Definition: type_traits.h:174
typename BasicJsonType::object_t object_t
Definition: type_traits.h:175
typename BasicJsonType::default_object_comparator_t object_comparator_t
Definition: type_traits.h:176
typename std::conditional< has_key_compare< object_t >::value, typename object_t::key_compare, object_comparator_t >::type type
Definition: type_traits.h:178
Definition: type_traits.h:190
Definition: type_traits.h:189
typename BasicJsonType::template json_serializer< T, void > serializer
Definition: type_traits.h:128
Definition: type_traits.h:113
Definition: type_traits.h:169
typename BasicJsonType::template json_serializer< T, void > serializer
Definition: type_traits.h:143
Definition: type_traits.h:138
typename BasicJsonType::template json_serializer< T, void > serializer
Definition: type_traits.h:158
Definition: type_traits.h:153
Definition: type_traits.h:62
Definition: type_traits.h:49
Definition: type_traits.h:713
Definition: type_traits.h:508
Definition: type_traits.h:372
Definition: type_traits.h:391
std::numeric_limits< RealIntegerType > RealLimits
Definition: type_traits.h:449
std::numeric_limits< CompatibleNumberIntegerType > CompatibleLimits
Definition: type_traits.h:450
Definition: type_traits.h:439
Definition: type_traits.h:462
typename BasicJsonType::object_t object_t
Definition: type_traits.h:300
Definition: type_traits.h:292
Definition: type_traits.h:312
Definition: type_traits.h:349
Definition: type_traits.h:465
Definition: type_traits.h:478
Definition: type_traits.h:285
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 > >::value_type range_value_t< ConstructibleArrayType > value_type
Definition: type_traits.h:421
Definition: type_traits.h:394
Definition: type_traits.h:435
typename BasicJsonType::object_t object_t
Definition: type_traits.h:324
Definition: type_traits.h:316
Definition: type_traits.h:345
Definition: type_traits.h:356
ConstructibleStringType laundered_type
Definition: type_traits.h:361
static constexpr auto value
Definition: type_traits.h:364
Definition: type_traits.h:481
Definition: type_traits.h:222
Definition: type_traits.h:202
Definition: type_traits.h:121
Definition: type_traits.h:238
Definition: type_traits.h:487
Definition: type_traits.h:72
Definition: type_traits.h:569
char x[2]
Definition: type_traits.h:570
Definition: type_traits.h:565
static one test(decltype(&C::capacity))
char one
Definition: type_traits.h:566
Definition: type_traits.h:257
static constexpr bool value
Definition: type_traits.h:271
Definition: type_traits.h:498
Definition: type_traits.h:735
Definition: iterator_traits.h:41
Definition: type_traits.h:196
static constexpr bool test(T val)
Definition: type_traits.h:666
static constexpr bool test(T)
Definition: type_traits.h:675
Definition: type_traits.h:661
static constexpr bool test(T val)
Definition: type_traits.h:619
static constexpr bool test(T val)
Definition: type_traits.h:639
static constexpr bool test(T val)
Definition: type_traits.h:629
static constexpr bool test(T val)
Definition: type_traits.h:650
Definition: type_traits.h:614