aboutsummaryrefslogtreecommitdiff
path: root/src/list/operation/replace_nth.h
blob: 519a040f3cdb28685f32b15524a9f88c53195037 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#ifndef TYPEASVALUE_SRC_LIST_OPERATION_REPLACE_NTH_H_
#define TYPEASVALUE_SRC_LIST_OPERATION_REPLACE_NTH_H_

#include "list/operation/concatenate.h"
#include "list/operation/take.h"
#include "list/operation/drop.h"

namespace tav {

template <
	typename Index,
	typename Value,
	typename Sequence
>
using ReplaceNth = Concatenate<List<
	Take<Index, Sequence>,
	List<Value>,
	Drop<Add<Index, Size<1>>, Sequence>
>>;

}

#endif  // TYPEASVALUE_SRC_LIST_OPERATION_REPLACE_NTH_H_