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