Skip to content

Commit dc2a500

Browse files
committed
Replaced && with and and || with or
1 parent 89c2ab9 commit dc2a500

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

include/msgpack23/msgpack23.h

+9-9
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ namespace msgpack23 {
214214
}
215215

216216
template<CollectionLike T>
217-
requires MapLike<T> && (!EnumLike<T>)
217+
requires MapLike<T> and (!EnumLike<T>)
218218
void pack_type(T const &value) {
219219
if (!pack_map_header(value.size())) {
220220
throw std::length_error("Map is too long to be serialized.");
@@ -226,7 +226,7 @@ namespace msgpack23 {
226226
}
227227

228228
template<CollectionLike T>
229-
requires (!MapLike<T>) && (!EnumLike<T>)
229+
requires (!MapLike<T>) and (!EnumLike<T>)
230230
void pack_type(T const &value) {
231231
if (!pack_array_header(value.size())) {
232232
throw std::length_error("Collection is too long to be serialized.");
@@ -287,7 +287,7 @@ namespace msgpack23 {
287287
}
288288

289289
template<typename T>
290-
requires (!CollectionLike<T>) && (!MapLike<T>) && (!EnumLike<T>) && (!VariantLike<T>)
290+
requires (!CollectionLike<T>) and (!MapLike<T>) and (!EnumLike<T>) and (!VariantLike<T>)
291291
void pack_type(T const &value) {
292292
value.pack(*this);
293293
}
@@ -340,7 +340,7 @@ namespace msgpack23 {
340340
}
341341

342342
void pack_type(std::int8_t const &value) {
343-
if (value > 31 || value < -32) {
343+
if (value > 31 or value < -32) {
344344
emplace_constant(FormatConstants::int8);
345345
}
346346
if constexpr (IsDryRun) {
@@ -608,7 +608,7 @@ namespace msgpack23 {
608608
}
609609

610610
template<MapLike T>
611-
requires CollectionLike<T> && (!EnumLike<T>)
611+
requires CollectionLike<T> and (!EnumLike<T>)
612612
void unpack_type(T &value) {
613613
using KeyType = typename T::key_type;
614614
using ValueType = typename T::mapped_type;
@@ -623,7 +623,7 @@ namespace msgpack23 {
623623
}
624624

625625
template<CollectionLike T>
626-
requires (!MapLike<T>) && EmplaceAvailable<T> && (!EnumLike<T>)
626+
requires (!MapLike<T>) and EmplaceAvailable<T> and (!EnumLike<T>)
627627
void unpack_type(T &value) {
628628
using ValueType = typename T::value_type;
629629
auto const array_size = unpack_array_header();
@@ -635,7 +635,7 @@ namespace msgpack23 {
635635
}
636636

637637
template<CollectionLike T>
638-
requires (!MapLike<T>) && (!EmplaceAvailable<T>) && (!EnumLike<T>)
638+
requires (!MapLike<T>) and (!EmplaceAvailable<T>) and (!EnumLike<T>)
639639
void unpack_type(T &value) {
640640
using ValueType = typename T::value_type;
641641
std::vector<ValueType> vec;
@@ -690,7 +690,7 @@ namespace msgpack23 {
690690
}
691691
auto const index = static_cast<std::int8_t>(read_integral<std::uint8_t>());
692692

693-
if (index < 0 || index > static_cast<std::int8_t>(std::variant_size_v<T> - 1)) {
693+
if (index < 0 or index > static_cast<std::int8_t>(std::variant_size_v<T> - 1)) {
694694
throw std::out_of_range("Invalid variant index");
695695
}
696696

@@ -706,7 +706,7 @@ namespace msgpack23 {
706706
}
707707

708708
template<typename T>
709-
requires (!CollectionLike<T>) && (!MapLike<T>) && (!EnumLike<T>) && (!VariantLike<T>)
709+
requires (!CollectionLike<T>) and (!MapLike<T>) and (!EnumLike<T>) and (!VariantLike<T>)
710710
void unpack_type(T &value) {
711711
value.unpack(*this);
712712
}

0 commit comments

Comments
 (0)