23 stream <<
"\n--- Generating sequence is the very first step in C++ Compile-Time Programming!"<<
endL;
25 stream <<
"--- make_sequence_t<InOrderSequence, 10>" <<
endl;
29 stream <<
"--- make_sequence_t<InOrderSequence, 0, 20>" <<
endl;
33 stream <<
"--- make_sequence_t<InOrderSequence, 0, 20, 2>" <<
endl;
37 stream <<
"--- make_sequence_t<InOrderSequence, 20, 0, -1>" <<
endl;
41 stream <<
"--- make_sequence_t<InOrderSequence, 19, 0, -1>" <<
endl;
45 stream <<
"--- make_sequence_t<InOrderSequence, 20, -1, -2>" <<
endl;
49 stream <<
"--- make_sequence_t<InOrderSequence, 19, -1, -2>" <<
endl;
53 stream <<
"--- make_sequence_t<ReverseSequence, 10>" <<
endl;
57 stream <<
"--- make_sequence_t<ReverseSequence, 0, 20>" <<
endl;
61 stream <<
"--- make_sequence_t<ReverseSequence, 0, 20, 2>" <<
endl;
65 stream <<
"--- make_sequence_t<ReverseSequence, 20, 0, -1>" <<
endl;
69 stream <<
"--- make_sequence_t<ReverseSequence, 19, 0, -1>" <<
endl;
73 stream <<
"--- make_sequence_t<ReverseSequence, 20, -1, -2>" <<
endl;
77 stream <<
"--- make_sequence_t<ReverseSequence, 19, -1, -2>" <<
endl;
84 stream <<
"--- Retrieving information of the existing sequence is also important!!" <<
endL;
86 stream <<
" sequence = make_sequence_t<types::InOrderSequence, -10, 10, 1>"<<
endl;
90 stream <<
" --- sequence_first_element_v<sequence>"<<
endl;
91 constexpr auto seq_1_first = types::sequence_first_element_v<sequence>;
92 stream <<
" First Element: " << seq_1_first <<
endL;
94 stream <<
" --- sequence_last_element_v<sequence>"<<
endl;
95 constexpr auto seq_1_last = types::sequence_last_element_v<sequence>;
96 stream <<
" Last Element: " << seq_1_last <<
endL;
98 stream <<
" --- sequence_element_count_v<sequence>"<<
endl;
99 constexpr auto seq_1_count = types::sequence_element_count_v<sequence>;
100 stream <<
" Count of Elements: " << seq_1_count <<
endL;
102 stream <<
" --- sequence_nth_element_v<0, sequence>"<<
endl;
103 constexpr auto seq_1_0th_element = types::sequence_nth_element_v<0, sequence>;
104 stream <<
" 0-th Element: " << seq_1_0th_element <<
endL;
106 stream <<
" --- types::sequence_nth_element_v<5, sequence>"<<
endl;
107 constexpr auto seq_1_5th_element = types::sequence_nth_element_v<5, sequence>;
108 stream <<
" 5-th Element: " << seq_1_5th_element <<
endL;
110 stream <<
" --- types::sequence_nth_element_v<18, sequence>"<<
endl;
111 constexpr auto seq_1_18th_element = types::sequence_nth_element_v<18, sequence>;
112 stream <<
" 18-th Element: " << seq_1_18th_element <<
endL;
114 stream <<
" --- sequence_span_v<sequence>"<<
endl;
115 constexpr auto seq_1_span = types::sequence_span_v<sequence>;
116 stream <<
" Span (Distance Between 2 Elements): " << seq_1_span <<
endL;
118 stream <<
" By using reversed_sequence = reverse_sequence_t<sequence>" <<
endl;
121 stream <<
" is now reversed as show: " << reversed_sequence{} <<
endL;
123 stream <<
"\t\t--- By Thomas Kim, Feb. 05, 2020. ---" <<
endl;
void test_sequence_information()
void test_make_sequence()
std::integer_sequence< std::common_type_t< std::remove_cvref_t< decltype(Indices)>... >, Indices... > sequence
Type to string name conversions are defined.
typename hidden::st_create_workhorse_range< SequenceInOrder, RangeValues... >::type make_sequence_t
constexpr bool InOrderSequence
hidden::reverse_sequence_t< remove_cvref_t< SequenceType > > reverse_sequence_t
constexpr bool ReverseSequence
Stream output operators << are implemented.