3-phase PV router
Loading...
Searching...
No Matches
is_base_of.hpp
Go to the documentation of this file.
1// ArduinoJson - https://arduinojson.org
2// Copyright © 2014-2023, Benoit BLANCHON
3// MIT License
4
5#pragma once
7
8// A meta-function that returns true if Derived inherits from TBase is an
9// integral type.
10template< typename TBase, typename TDerived >
12{
13protected: // <- to avoid GCC's "all member functions in class are private"
14 static int probe(const TBase*);
15 static char probe(...);
16
17public:
18 static const bool value =
19 sizeof(probe(reinterpret_cast< typename remove_reference< TDerived >::type* >(
20 0)))
21 == sizeof(int);
22};
static int probe(const TBase *)
static char probe(...)
static const bool value
Definition: is_base_of.hpp:18