@@ -21637,6 +21637,10 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec
21637
21637
21638
21638
return default_value;
21639
21639
}
21640
+ else if (JSON_HEDLEY_LIKELY(is_null()))
21641
+ {
21642
+ return default_value;
21643
+ }
21640
21644
21641
21645
JSON_THROW(type_error::create(306, detail::concat("cannot use value() with ", type_name()), this));
21642
21646
}
@@ -21662,6 +21666,10 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec
21662
21666
21663
21667
return std::forward<ValueType>(default_value);
21664
21668
}
21669
+ else if (JSON_HEDLEY_LIKELY(is_null()))
21670
+ {
21671
+ return std::forward<ValueType>(default_value);
21672
+ }
21665
21673
21666
21674
JSON_THROW(type_error::create(306, detail::concat("cannot use value() with ", type_name()), this));
21667
21675
}
@@ -21688,6 +21696,10 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec
21688
21696
21689
21697
return default_value;
21690
21698
}
21699
+ else if (JSON_HEDLEY_LIKELY(is_null()))
21700
+ {
21701
+ return default_value;
21702
+ }
21691
21703
21692
21704
JSON_THROW(type_error::create(306, detail::concat("cannot use value() with ", type_name()), this));
21693
21705
}
@@ -21715,6 +21727,10 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec
21715
21727
21716
21728
return std::forward<ValueType>(default_value);
21717
21729
}
21730
+ else if (JSON_HEDLEY_LIKELY(is_null()))
21731
+ {
21732
+ return std::forward<ValueType>(default_value);
21733
+ }
21718
21734
21719
21735
JSON_THROW(type_error::create(306, detail::concat("cannot use value() with ", type_name()), this));
21720
21736
}
@@ -21739,6 +21755,10 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec
21739
21755
return default_value;
21740
21756
}
21741
21757
}
21758
+ else if (JSON_HEDLEY_LIKELY(is_null()))
21759
+ {
21760
+ return default_value;
21761
+ }
21742
21762
21743
21763
JSON_THROW(type_error::create(306, detail::concat("cannot use value() with ", type_name()), this));
21744
21764
}
@@ -21764,6 +21784,10 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec
21764
21784
return std::forward<ValueType>(default_value);
21765
21785
}
21766
21786
}
21787
+ else if (JSON_HEDLEY_LIKELY(is_null()))
21788
+ {
21789
+ return std::forward<ValueType>(default_value);
21790
+ }
21767
21791
21768
21792
JSON_THROW(type_error::create(306, detail::concat("cannot use value() with ", type_name()), this));
21769
21793
}
0 commit comments