LeechCraft 0.6.70-17335-ge406ffdcaf
Modular cross-platform feature rich live environment.
Loading...
Searching...
No Matches
typelevel.h
Go to the documentation of this file.
1/**********************************************************************
2 * LeechCraft - modular cross-platform feature rich internet client.
3 * Copyright (C) 2006-2014 Georg Rudoy
4 *
5 * Distributed under the Boost Software License, Version 1.0.
6 * (See accompanying file LICENSE or copy at https://www.boost.org/LICENSE_1_0.txt)
7 **********************************************************************/
8
9#pragma once
10
11#include <type_traits>
12
13namespace LC
14{
15namespace Util
16{
17 template<template<typename> class Pred>
18 struct Not
19 {
20 template<typename V>
21 struct Negate;
22
23 template<bool V>
24 struct Negate<std::integral_constant<bool, V>>
25 {
26 using Result_t = std::integral_constant<bool, !V>;
27 };
28
29 template<typename T>
30 struct Result_t : Negate<typename Pred<T>::type>::Result_t {};
31 };
32
33 template<template<typename> class Pred, typename... Args>
34 constexpr auto AllOf = (Pred<Args> {} && ...);
35
36 template<template<typename> class Pred, typename... Args>
37 constexpr auto AnyOf = (Pred<Args> {} || ...);
38}
39}
constexpr auto AllOf
Definition typelevel.h:34
constexpr auto AnyOf
Definition typelevel.h:37
Definition constants.h:15