LeechCraft 0.6.70-16373-g319c272718
Modular cross-platform feature rich live environment.
Loading...
Searching...
No Matches
detector.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 namespace detail
18 {
19 template<typename Default, typename Placeholder, template<typename...> class Op, typename... Args>
21 {
22 using value_t = std::false_type;
23 using type = Default;
24 };
25
26 template<typename Default, template<typename...> class Op, typename... Args>
27 struct IsDetected<Default, std::void_t<Op<Args...>>, Op, Args...>
28 {
29 using value_t = std::true_type;
30 using type = Op<Args...>;
31 };
32 }
33
34 template<template<typename...> class Op, typename... Args>
35 constexpr bool IsDetected_v = detail::IsDetected<void, void, Op, Args...>::value_t::value;
36
37 template<typename Type, template<typename...> class Op, typename... Args>
38 using IsDetected_t = typename detail::IsDetected<Type, void, Op, Args...>::type;
39}
40}
Container< T > Filter(const Container< T > &c, F f)
Definition prelude.h:118
constexpr bool IsDetected_v
Definition detector.h:35
typename detail::IsDetected< Type, void, Op, Args... >::type IsDetected_t
Definition detector.h:38
Definition constants.h:15
STL namespace.
std::false_type value_t
Definition detector.h:22