blob: a7e827a8644196da18e5ede21977e95ba38b66c0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
// ArduinoJson - https://arduinojson.org
// Copyright Benoit Blanchon 2014-2021
// MIT License
#pragma once
#include "lib/ArduinoJson/Namespace.hpp"
#include <stddef.h> // for size_t
namespace ARDUINOJSON_NAMESPACE {
// A meta-function that returns the highest value
template <size_t X, size_t Y, bool MaxIsX = (X > Y)>
struct Max {};
template <size_t X, size_t Y>
struct Max<X, Y, true> {
static const size_t value = X;
};
template <size_t X, size_t Y>
struct Max<X, Y, false> {
static const size_t value = Y;
};
} // namespace ARDUINOJSON_NAMESPACE
|