mpc
Haskell-like feature supports in C++
stdfundamental.hpp
Go to the documentation of this file.
1
2#pragma once
3#include <cassert> // assert
4#include <compare>
5#include <concepts>
6#include <cstddef> // size_t, ptrdiff_t, nullptr_t
7#include <cstdint> // int32_t
8#include <initializer_list> // initializer_list
9#include <tuple> // tuple
10#include <type_traits> // enable_if_t, void_t, true_type, invoke_result, etc.
11// #include <utility> // move, forward, pair, swap, exchange, declval
12
13namespace mpc {
15 template <class...>
16 inline constexpr bool always_false = false;
17
19 template <class...>
20 using always_true_type = std::true_type;
21
23 template <std::size_t N>
24 using index_constant = std::integral_constant<std::size_t, N>;
25
27 template <class... Bn>
28 using _and = std::conjunction<Bn...>;
29
31 template <class... Bn>
32 using _or = std::disjunction<Bn...>;
33
35 template <class B>
36 using _not = std::negation<B>;
37
39 template <class... Bn>
40 inline constexpr bool _and_v = _and<Bn...>::value;
41
43 template <class... Bn>
44 inline constexpr bool _or_v = _or<Bn...>::value;
45
47 template <class B>
48 inline constexpr bool _not_v = _not<B>::value;
49} // namespace mpc
constexpr bool _not_v
_not_v
Definition: stdfundamental.hpp:48
constexpr bool _or_v
_or_v
Definition: stdfundamental.hpp:44
std::negation< B > _not
_not
Definition: stdfundamental.hpp:36
std::integral_constant< std::size_t, N > index_constant
index_constant
Definition: stdfundamental.hpp:24
std::true_type always_true_type
always_true_type
Definition: stdfundamental.hpp:20
std::conjunction< Bn... > _and
_and
Definition: stdfundamental.hpp:28
constexpr bool _and_v
_and_v
Definition: stdfundamental.hpp:40
std::disjunction< Bn... > _or
_or
Definition: stdfundamental.hpp:32
constexpr bool always_false
always_false
Definition: stdfundamental.hpp:16