mpc
Haskell-like feature supports in C++
holding.hpp
Go to the documentation of this file.
1
2
#pragma once
3
#include <
mpc/stdfundamental.hpp
>
4
5
namespace
mpc {
6
template
<
class
>
7
struct
holding
;
8
9
template
<
class
T>
10
using
holding_t =
typename
holding<std::remove_cvref_t<T>
>::type;
11
12
template
<
class
T,
class
U>
13
struct
holding_or
: std::type_identity<U> {};
14
15
template
<
class
T,
class
U>
16
requires
requires
{
typename
holding<std::remove_cvref_t<T>
>::type; }
17
struct
holding_or
<T, U> :
holding
<std::remove_cvref_t<T>> {};
18
19
template
<
class
T,
class
U>
20
using
holding_or_t =
typename
holding_or<T, U>::type
;
21
}
// namespace mpc
stdfundamental.hpp
mpc::holding_or
Definition:
holding.hpp:13
mpc::holding
Definition:
holding.hpp:7
include
mpc
control
holding.hpp
Generated by
1.9.2