Lodestar
An integrated real-time control package in C++
Conjunction.hpp
1
//
2
// Created by Hamza El-Kebir on 5/27/21.
3
//
4
5
#ifndef LODESTAR_CONJUNCTION_HPP
6
#define LODESTAR_CONJUNCTION_HPP
7
8
// std::Conjunction implementation (> C++17)
9
// https://en.cppreference.com/w/cpp/types/conjunction
10
// See https://www.fluentcpp.com/2021/04/30/how-to-implement-stdconjunction-and-stddisjunction-in-c11/
11
template
<
class
...>
12
struct
Conjunction
: std::true_type {
13
};
14
15
template
<
class
B1>
16
struct
Conjunction<B1>
: B1 {
17
};
18
19
template
<
class
B1,
class
... Bn>
20
struct
Conjunction
<B1, Bn...>
21
: std::conditional<bool(B1::value), Conjunction<Bn...>, B1>::type {
22
};
23
24
#endif //LODESTAR_CONJUNCTION_HPP
Conjunction< B1 >
Definition:
Conjunction.hpp:16
Conjunction
Definition:
Conjunction.hpp:12
Lodestar
aux
Conjunction.hpp
Generated by
1.8.17