LeechCraft
0.6.70-18450-gabe19ee3b0
Modular cross-platform feature rich live environment.
Toggle main menu visibility
Loading...
Searching...
No Matches
intseq.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 <utility>
12
13
namespace
LC
14
{
15
namespace
Util
16
{
17
namespace
IntSeq
18
{
19
template
<
typename
T, T...
Fst
, T...
Snd
>
20
std::integer_sequence<T,
Fst
...,
Snd
...>
21
ConcatImpl
(std::integer_sequence<T, Fst...>, std::integer_sequence<T, Snd...>);
22
23
template
<
typename
... Seqs>
24
struct
ConcatS
;
25
26
template
<
typename
... Seqs>
27
using
Concat
=
typename
ConcatS
<Seqs...>::Type_t;
28
29
template
<
typename
Seq>
30
struct
ConcatS
<Seq>
31
{
32
using
Type_t
= Seq;
33
};
34
35
template
<
typename
Seq1,
typename
Seq2,
typename
... Rest>
36
struct
ConcatS
<Seq1, Seq2, Rest...>
37
{
38
using
Type_t
=
Concat
<
decltype
(
ConcatImpl
(Seq1 {}, Seq2 {})), Rest...>;
39
};
40
41
template
<
typename
T, T E,
size_t
C>
42
struct
RepeatS
43
{
44
template
<T... Is>
45
static
auto
RepeatImpl
(std::integer_sequence<T, Is...>)
46
{
47
return
std::integer_sequence<T, (static_cast<void> (Is), E)...> {};
48
}
49
50
using
Type_t
=
decltype
(
RepeatImpl
(std::make_integer_sequence<T, C> {}));
51
};
52
53
template
<
typename
T, T E,
size_t
C>
54
using
Repeat
=
typename
RepeatS<T, E, C>::Type_t
;
55
}
56
}
57
}
LC::Util::IntSeq
Definition
intseq.h:18
LC::Util::IntSeq::Repeat
typename RepeatS< T, E, C >::Type_t Repeat
Definition
intseq.h:54
LC::Util::IntSeq::Concat
typename ConcatS< Seqs... >::Type_t Concat
Definition
intseq.h:27
LC::Util::IntSeq::ConcatImpl
std::integer_sequence< T, Fst..., Snd... > ConcatImpl(std::integer_sequence< T, Fst... >, std::integer_sequence< T, Snd... >)
LC::Util
Definition
icoreproxy.h:34
LC::Util::Snd
constexpr auto Snd
Definition
prelude.h:220
LC::Util::Fst
constexpr auto Fst
Definition
prelude.h:218
LC
Definition
constants.h:15
LC::Util::IntSeq::ConcatS< Seq1, Seq2, Rest... >::Type_t
Concat< decltype(ConcatImpl(Seq1 {}, Seq2 {})), Rest... > Type_t
Definition
intseq.h:38
LC::Util::IntSeq::ConcatS< Seq >::Type_t
Seq Type_t
Definition
intseq.h:32
LC::Util::IntSeq::ConcatS
Definition
intseq.h:24
LC::Util::IntSeq::RepeatS
Definition
intseq.h:43
LC::Util::IntSeq::RepeatS::Type_t
decltype(RepeatImpl(std::make_integer_sequence< T, C > {})) Type_t
Definition
intseq.h:50
LC::Util::IntSeq::RepeatS::RepeatImpl
static auto RepeatImpl(std::integer_sequence< T, Is... >)
Definition
intseq.h:45
src
util
sll
intseq.h
Generated by
1.17.0