Aleph-w 7.10.0
A C++ Library for Data Structures and Algorithms
Loading...
Searching...
No Matches
ah_errors_message_test.cc
Go to the documentation of this file.
1/*
2 Aleph_w
3
4 Data structures & Algorithms
5 version 2.0.0b
6 https://github.com/lrleon/Aleph-w
7
8 This file is part of Aleph-w library
9
10 Copyright (c) 2002-2026 Leandro Rabindranath Leon
11
12 Permission is hereby granted, free of charge, to any person obtaining a copy
13 of this software and associated documentation files (the "Software"), to deal
14 in the Software without restriction, including without limitation the rights
15 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
16 copies of the Software, and to permit persons to whom the Software is
17 furnished to do so, subject to the following conditions:
18
19 The above copyright notice and this permission notice shall be included in all
20 copies or substantial portions of the Software.
21
22 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
23 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
24 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
25 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
26 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
27 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
28 SOFTWARE.
29*/
45# include <gtest/gtest.h>
46
47# include <atomic>
48# include <cstring>
49# include <iomanip>
50# include <ios>
51# include <ostream>
52# include <sstream>
53# include <stdexcept>
54# include <string>
55# include <string_view>
56# include <thread>
57# include <type_traits>
58# include <typeinfo>
59# include <utility>
60
61# include <ah-errors.H>
62# include <bitArray.H>
63# include <tpl_array.H>
64# include <tpl_arrayQueue.H>
65# include <tpl_dynArray.H>
66# include <tpl_memArray.H>
67# include <tpl_small_vector.H>
68
69namespace
70{
71 // The head of the message of a macro invoked at `line` of this file
72 std::string place(const int line)
73 {
74 return "(" + std::string(__FILE__) + ":" + std::to_string(line) + ") | ";
75 }
76
77 // The message of the exception that raise() throws, which must be an E
78 // itself, and not of a type derived from E
79 template <class E, class Raise>
80 std::string message_of(Raise && raise)
81 {
82 try
83 {
84 std::forward<Raise>(raise)();
85 }
86 catch (const E & e)
87 {
88 EXPECT_TRUE(typeid(e) == typeid(E)) << "thrown: " << typeid(e).name();
89 return e.what();
90 }
91 catch (...)
92 {
93 ADD_FAILURE() << "an exception of another type";
94 return "";
95 }
96 ADD_FAILURE() << "no exception";
97 return "";
98 }
99
100 // What follows the place in a message, and the file of the place
101 std::string text_of(const std::string & message)
102 {
103 const size_t at = message.find(") | ");
104 return at == std::string::npos ? message : message.substr(at + 4);
105 }
106
107 std::string file_of(const std::string & message)
108 {
109 const size_t at = message.find(") | ");
110 if (message.empty() or message.front() != '(' or at == std::string::npos)
111 return "";
112 const std::string where = message.substr(1, at - 1); // file:line
113 return where.substr(0, where.rfind(':'));
114 }
115
116 bool ends_with(const std::string & text, const std::string & tail)
117 {
118 return text.size() >= tail.size() and
119 text.compare(text.size() - tail.size(), tail.size(), tail) == 0;
120 }
121
122 struct Point
123 {
124 int x;
125 int y;
126 };
127
128 std::ostream & operator << (std::ostream & out, const Point & p)
129 {
130 return out << "(" << p.x << ", " << p.y << ")";
131 }
132
133 enum Color { Red, Green = 5 };
134
135 struct Fields
136 {
137 unsigned low : 3;
138 unsigned high : 5;
139 };
140
141 std::string twice(const std::string & s) { return s + s; }
142
143 // Throws while an item of a message is evaluated
144 std::string throw_if_odd(const int n)
145 {
146 if (n % 2 != 0)
147 throw std::underflow_error("the evaluation of an item");
148 return "even";
149 }
150
151 // Its text is overwritten when it dies, so that a message formatted
152 // after the end of its expression would not show it
153 struct Tracked
154 {
155 std::string text;
156
157 explicit Tracked(std::string t) : text(std::move(t)) {}
158
159 ~Tracked() { text.assign(text.size(), '#'); }
160 };
161
162 std::ostream & operator << (std::ostream & out, const Tracked & t)
163 {
164 return out << t.text;
165 }
166
167 // Its insertion throws, after writing in the stream
168 struct Throws_When_Inserted {};
169
170 std::ostream & operator << (std::ostream & out, const Throws_When_Inserted &)
171 {
172 out << "half an item";
173 throw std::length_error("the insertion of an item");
174 }
175
176 // Throws and catches a message of its own, and gives its text
177 std::string text_of_another_message(const int n)
178 {
179 try
180 {
181 ah_domain_error_if(n > 0) << "inner " << n << " of " << twice("in");
182 }
183 catch (const std::domain_error & e)
184 {
185 return text_of(e.what());
186 }
187 return "nothing";
188 }
189
190 // The streams that took a Watches_Its_Stream, and those of them that
191 // died
192 int streams_watched = 0;
193 int streams_dead = 0;
194
195 void count_a_dead_stream(const std::ios_base::event event, std::ios_base &,
196 int)
197 {
198 if (event == std::ios_base::erase_event)
199 ++streams_dead;
200 }
201
202 // Its insertion makes the stream that takes it tell when it dies
203 struct Watches_Its_Stream {};
204
205 std::ostream & operator << (std::ostream & out, const Watches_Its_Stream &)
206 {
207 ++streams_watched;
208 out.register_callback(count_a_dead_stream, 0);
209 return out << "watched";
210 }
211
212 // An overload that the standard allows to a caller: it takes the strings
213 // that go into an rvalue stream where it is visible
215 {
216 int strings_taken = 0;
217
218 std::ostringstream && operator << (std::ostringstream && out,
219 const char * str)
220 {
221 ++strings_taken;
222 static_cast<std::ostream &>(out) << str;
223 return std::move(out);
224 }
225
226 void raise() { ah_range_error() << "an item " << 7 << " and another"; }
227 }
228}
229
230// The message of `call items` is the place of the call, with its line,
231// followed by what a stream gets from `items`, which are evaluated twice.
232// The whole invocation goes on one line: the compilers do not agree on the
233// line that __LINE__ gives in an invocation that spans several.
234# define EXPECT_THE_WHOLE(E, call, items) \
235 do \
236 { \
237 std::ostringstream expected; \
238 expected items; \
239 EXPECT_EQ(message_of<E>([&] { call items; }), \
240 place(__LINE__) + expected.str()); \
241 } \
242 while (false)
243
244// The text of the message of `call items`, behind its place, is what a
245// stream gets from `items`, which are evaluated twice. The invocation may
246// span several lines: of the place, only the file is checked.
247# define EXPECT_THE_ITEMS(E, call, items) \
248 do \
249 { \
250 std::ostringstream expected; \
251 expected items; \
252 const std::string message = message_of<E>([&] { call items; }); \
253 EXPECT_EQ(file_of(message), __FILE__); \
254 EXPECT_EQ(text_of(message), expected.str()); \
255 } \
256 while (false)
257
258// The text of the message of `statement`, behind its place, is `text`.
259# define EXPECT_THE_TEXT(E, statement, text) \
260 do \
261 { \
262 const std::string message = message_of<E>([&] { statement; }); \
263 EXPECT_EQ(file_of(message), __FILE__); \
264 EXPECT_EQ(text_of(message), text); \
265 } \
266 while (false)
267
268// The five forms of a macro, whose names start with `base`.
269# define EXPECT_THE_MESSAGES_OF(E, base) \
270 do \
271 { \
272 EXPECT_THE_WHOLE(E, base ## _if(n == 7), ITEMS); \
273 EXPECT_THE_WHOLE(E, base ## _unless(n != 7), ITEMS); \
274 EXPECT_THE_WHOLE(E, base(), ITEMS); \
275 EXPECT_THE_WHOLE(E, base ## _if_constexpr(true), ITEMS); \
276 EXPECT_THE_WHOLE(E, base ## _unless_constexpr(false), ITEMS); \
277 } \
278 while (false)
279
280TEST(ErrorMessage, EveryMacroGivesItsPlaceAndItsItems)
281{
282 const int n = 7;
283 const std::string s = "seven";
284# define ITEMS << "value " << n << ", " << s << ' ' << 2.5
285
286 EXPECT_THE_MESSAGES_OF(std::range_error, ah_range_error);
287 EXPECT_THE_MESSAGES_OF(std::runtime_error, ah_runtime_error);
288 EXPECT_THE_MESSAGES_OF(std::logic_error, ah_logic_error);
289 EXPECT_THE_MESSAGES_OF(std::underflow_error, ah_underflow_error);
290 EXPECT_THE_MESSAGES_OF(std::overflow_error, ah_overflow_error);
291 EXPECT_THE_MESSAGES_OF(std::domain_error, ah_domain_error);
293 EXPECT_THE_MESSAGES_OF(std::invalid_argument, ah_invalid_argument);
294 EXPECT_THE_MESSAGES_OF(std::length_error, ah_length_error);
295 EXPECT_THE_WHOLE(std::runtime_error, ah_fatal_error(), ITEMS);
296
297# undef ITEMS
298}
299
300TEST(ErrorMessage, AMessageWithoutItemsIsItsPlace)
301{
302 EXPECT_THE_WHOLE(std::range_error, ah_range_error_if(true), << "");
303 EXPECT_THE_WHOLE(std::length_error, ah_length_error(), << "");
304 EXPECT_THE_TEXT(std::domain_error, ah_domain_error_unless(false), "");
305}
306
307TEST(ErrorMessage, TakesTheItemsThatAStreamTakes)
308{
309 const char * const text = "a pointer to chars";
310 const char chars[] = "an array of chars";
311 const std::string str = "a string";
312 const std::string_view view = "a view";
313 const Point point = {3, -4};
314 const Fields fields = {5, 17};
315 const int number = 42;
316 const int * const address = &number;
317 const void * const nothing = nullptr;
318
319 EXPECT_THE_ITEMS(std::domain_error, ah_domain_error(), << "a literal");
320 EXPECT_THE_ITEMS(std::domain_error, ah_domain_error(),
321 << text << ' ' << chars << ' ' << str << ' ' << view);
322 EXPECT_THE_ITEMS(std::domain_error, ah_domain_error(),
323 << 'c' << static_cast<signed char>('s')
324 << static_cast<unsigned char>('u') << true << false);
325 EXPECT_THE_ITEMS(std::domain_error, ah_domain_error(),
326 << static_cast<short>(-3) << ' ' << 7u << ' ' << -9l << ' '
327 << 10ul << ' ' << -11ll << ' ' << 12ull);
328 EXPECT_THE_ITEMS(std::domain_error, ah_domain_error(),
329 << 2.5f << ' ' << 0.1 << ' ' << 3.0l << ' ' << 1e300);
330 EXPECT_THE_ITEMS(std::domain_error, ah_domain_error(),
331 << address << ' ' << nothing << ' '
332 << static_cast<const void *>(text));
333 EXPECT_THE_ITEMS(std::domain_error, ah_domain_error(),
334 << point << ' ' << Green << ' ' << fields.low << ' '
335 << fields.high);
336}
337
338TEST(ErrorMessage, TakesTheManipulatorsOfAStream)
339{
340 EXPECT_THE_ITEMS(std::domain_error, ah_domain_error(),
341 << std::hex << 255 << ' ' << std::dec << 255 << ' '
342 << std::oct << 8 << ' ' << std::boolalpha << true);
343 EXPECT_THE_ITEMS(std::domain_error, ah_domain_error(),
344 << std::setw(6) << std::setfill('*') << 42 << ' '
345 << std::setprecision(3) << 3.14159 << ' ' << std::fixed
346 << 2.5 << ' ' << std::showpos << 7);
347 EXPECT_THE_ITEMS(std::domain_error, ah_domain_error(),
348 << "a line" << std::endl << "and another" << std::flush);
349}
350
351TEST(ErrorMessage, KeepsTheTemporariesOfItsItemsUntilItThrows)
352{
353 const std::string ab = "ab";
354
355 EXPECT_THE_TEXT(std::runtime_error,
356 ah_runtime_error() << twice(ab) << ' ' << std::string(3, 'z'),
357 "abab zzz");
358 EXPECT_THE_TEXT(std::runtime_error,
359 ah_runtime_error_if(ab.size() == 2)
360 << Tracked("alive") << ' ' << Tracked(twice(ab)),
361 "alive abab");
362}
363
364TEST(ErrorMessage, EvaluatesItsItemsOnceInOrderAndOnlyToThrow)
365{
366 int calls = 0;
367 const auto next = [&calls] { return ++calls; };
368
369 EXPECT_THE_TEXT(std::logic_error,
370 ah_logic_error_if(calls == 0)
371 << next() << ' ' << next() << ' ' << next(),
372 "1 2 3");
373 EXPECT_EQ(calls, 3);
374
375 ah_logic_error_if(calls == 0) << next() << next();
376 ah_logic_error_unless(calls == 3) << next();
377 EXPECT_EQ(calls, 3);
378}
379
380// An item is read when it is inserted, not when the exception is thrown:
381// what a later item of the message does to it does not reach its text.
382TEST(ErrorMessage, ReadsEachItemWhenItIsInserted)
383{
384 int i = 1;
385 EXPECT_THE_TEXT(std::logic_error,
386 ah_logic_error() << i << ' ' << ++i << ' ' << i, "1 2 2");
387
388 std::string value = "before";
389 EXPECT_THE_TEXT(std::logic_error,
390 ah_logic_error() << value << '|' << (value = "after"),
391 "before|after");
392
393 const char * word = "first";
394 EXPECT_THE_TEXT(std::logic_error,
395 ah_logic_error() << word << ' ' << (word = "second"),
396 "first second");
397
398 char buffer[8] = "one";
399 EXPECT_THE_TEXT(std::logic_error,
400 ah_logic_error() << buffer << '|'
401 << std::strcpy(buffer, "two"),
402 "one|two");
403
404 Point point = {1, 2};
405 const Point other = {3, 4};
406 EXPECT_THE_TEXT(std::logic_error,
407 ah_logic_error() << point << " then " << (point = other),
408 "(1, 2) then (3, 4)");
409}
410
411TEST(ErrorMessage, GoesThroughAMacroThatTakesItAsAnArgument)
412{
413 const int limit = 3;
414
415 EXPECT_THROW(ah_domain_error_if(limit == 3) << "limit " << limit,
416 std::domain_error);
417 EXPECT_NO_THROW(ah_domain_error_if(limit != 3) << "limit " << limit);
418 EXPECT_THROW(ah_out_of_range_error() << limit << ", " << limit,
419 std::out_of_range);
420}
421
422// What owns the stream of a message is one pointer, which is all that the
423// frame of the function that checks needs for it; a stream in that frame
424// took 376 bytes with libstdc++ on x86-64, and a function with such a
425// frame is not inlined. What the compiler makes of the frame is not seen
426// here. And the stream is given as the temporary stream of the macros
427// was, so that the items go into it as they did.
428TEST(ErrorMessage, TheStreamOfAMessageTakesAPointerOfTheFrame)
429{
431
432 static_assert(sizeof(Message_Stream) == sizeof(void *));
433 static_assert(not std::is_copy_constructible_v<Message_Stream>);
434 static_assert(not std::is_copy_assignable_v<Message_Stream>);
435
436 using Former_Head = decltype(std::ostringstream() << "(" << __FILE__ << ":"
437 << __LINE__ << ") | ");
438 static_assert(std::is_same_v<Former_Head, std::ostringstream &&>);
439 using Head = decltype(std::declval<Message_Stream>().stream());
440 static_assert(std::is_same_v<Head, Former_Head>);
441
442 Message_Stream message("a file", 7);
443 std::ostringstream && stream = message.stream();
444 EXPECT_EQ(stream.str(), "(a file:7) | ");
445 stream << "an item";
446 EXPECT_EQ(message.stream().str(), "(a file:7) | an item");
447}
448
449// An exception thrown by an item leaves, in the place of that of the
450// macro. The stream of a message dies, once, when its exception leaves,
451// be it that of the macro or that of an item: an item watches it.
452TEST(ErrorMessage, TheStreamDiesWhenItsExceptionLeaves)
453{
454 streams_watched = streams_dead = 0;
455 for (int i = 0; i < 100; ++i)
456 {
457 EXPECT_THROW(ah_runtime_error() << Watches_Its_Stream() << " before",
458 std::runtime_error);
459 EXPECT_EQ(streams_dead, 3 * i + 1);
460 EXPECT_THROW(ah_runtime_error() << Watches_Its_Stream() << " before "
461 << Throws_When_Inserted() << " after", std::length_error);
462 EXPECT_EQ(streams_dead, 3 * i + 2);
463 EXPECT_THROW(ah_runtime_error_if(i >= 0) << Watches_Its_Stream()
464 << throw_if_odd(2 * i + 1), std::underflow_error);
465 EXPECT_EQ(streams_dead, 3 * i + 3);
466 }
467 EXPECT_EQ(streams_watched, 300);
468}
469
470// The place of a message is written inside the library, by the inserters
471// of the standard library. An overload of the caller for an rvalue stream
472// takes the strings among the items of that caller, and not the three of
473// the place and the name of the file.
474TEST(ErrorMessage, AnOverloadOfTheCallerTakesItsItemsAndNotThePlace)
475{
476 overload_of_the_caller::strings_taken = 0;
477 const std::string message =
478 message_of<std::range_error>(overload_of_the_caller::raise);
479 EXPECT_EQ(file_of(message), __FILE__);
480 EXPECT_EQ(text_of(message), "an item 7 and another");
481 EXPECT_EQ(overload_of_the_caller::strings_taken, 2);
482}
483
484// Each message has a stream of its own: the threads that throw at once
485// share nothing.
486TEST(ErrorMessage, EachThreadWritesItsOwnMessages)
487{
488 constexpr int Num_Threads = 8;
489 constexpr int Num_Messages = 2000;
490 std::atomic<int> wrong = 0;
492 for (int t = 0; t < Num_Threads; ++t)
493 threads.append(std::thread([t, &wrong]
494 {
495 for (int i = 1; i <= Num_Messages; ++i)
496 try
497 {
498 ah_runtime_error() << "thread " << t << ", message " << i
499 << ", " << text_of_another_message(i);
500 }
501 catch (const std::runtime_error & e)
502 {
503 if (text_of(e.what()) != "thread " + std::to_string(t) +
504 ", message " + std::to_string(i) + ", inner " +
505 std::to_string(i) + " of inin")
506 ++wrong;
507 }
508 }));
509 for (int t = 0; t < Num_Threads; ++t)
510 threads(t).join();
511 EXPECT_EQ(wrong, 0);
512}
513
514// A message that an item of another throws and catches does not touch
515// that other.
516TEST(ErrorMessage, AMessageInsideAnotherKeepsBoth)
517{
518 EXPECT_THE_TEXT(std::runtime_error,
519 ah_runtime_error() << "outer, " << text_of_another_message(7)
520 << ", " << text_of_another_message(0) << ", end",
521 "outer, inner 7 of inin, nothing, end");
522}
523
524TEST(ErrorMessage, ACheckedAccessOutOfRangeThrowsWithItsText)
525{
526 {
527 Aleph::Array<int> array = {1, 2, 3};
528 const std::string message =
529 message_of<std::out_of_range>([&] { (void) array[3]; });
530 EXPECT_EQ(text_of(message), "access out of range");
531 EXPECT_TRUE(ends_with(file_of(message), "tpl_memArray.H")) << message;
532 EXPECT_EQ(array[2], 3);
533 }
534 {
536 array.put(1);
537 const std::string message =
538 message_of<std::out_of_range>([&] { (void) array[1]; });
539 EXPECT_EQ(text_of(message), "access out of range");
540 EXPECT_EQ(array[0], 1);
541 }
542 {
544 vector.append(1);
545 const std::string message =
546 message_of<std::out_of_range>([&] { (void) vector[1]; });
547 EXPECT_EQ(text_of(message), "SmallVector: index out of range");
548 EXPECT_TRUE(ends_with(file_of(message), "tpl_small_vector.H")) << message;
549 EXPECT_EQ(vector[0], 1);
550 }
551 {
553 array.touch(2) = 7;
554 const std::string message =
555 message_of<std::out_of_range>([&] { (void) array.read(5); });
556 EXPECT_EQ(text_of(message),
557 "DynArray::read(5): index out of range; size() is 3");
558 EXPECT_TRUE(ends_with(file_of(message), "tpl_dynArray.H")) << message;
559 EXPECT_EQ(array.read(2), 7);
560 }
561 {
563 queue.put(1);
564 const std::string message =
565 message_of<std::out_of_range>([&] { (void) queue[1]; });
566 EXPECT_EQ(text_of(message), "queue index out of range");
567 EXPECT_TRUE(ends_with(file_of(message), "tpl_arrayQueue.H")) << message;
568 EXPECT_EQ(queue[0], 1);
569 }
570 {
572 const std::string message =
573 message_of<std::out_of_range>([&] { (void) bits.read_bit(8); });
574 EXPECT_EQ(text_of(message), "index out of range");
575 EXPECT_TRUE(ends_with(file_of(message), "bitArray.H")) << message;
576 EXPECT_EQ(bits.read_bit(7), 0);
577 }
578}
Exception handling system with formatted messages for Aleph-w.
#define ah_domain_error()
Throws std::domain_error unconditionally.
Definition ah-errors.H:702
#define ah_runtime_error()
Throws std::runtime_error unconditionally.
Definition ah-errors.H:431
#define ah_domain_error_unless(C)
Throws std::domain_error if condition does NOT hold.
Definition ah-errors.H:686
#define ah_length_error()
Throws std::length_error unconditionally.
Definition ah-errors.H:878
#define ah_fatal_error()
Throws an unconditional std::runtime_error (fatal error)
Definition ah-errors.H:907
#define ah_logic_error_unless(C)
Throws std::logic_error if condition does NOT hold.
Definition ah-errors.H:458
#define ah_invalid_argument()
Throws std::invalid_argument unconditionally.
Definition ah-errors.H:819
#define ah_overflow_error()
Throws std::overflow_error unconditionally.
Definition ah-errors.H:643
#define ah_domain_error_if(C)
Throws std::domain_error if condition holds.
Definition ah-errors.H:670
#define ah_logic_error_if(C)
Throws std::logic_error if condition holds.
Definition ah-errors.H:474
#define ah_logic_error()
Throws std::logic_error unconditionally.
Definition ah-errors.H:490
#define ah_runtime_error_if(C)
Throws std::runtime_error if condition holds.
Definition ah-errors.H:415
#define ah_underflow_error()
Throws std::underflow_error unconditionally.
Definition ah-errors.H:549
#define ah_range_error()
Throws std::range_error unconditionally.
Definition ah-errors.H:372
#define ah_range_error_if(C)
Throws std::range_error if condition holds.
Definition ah-errors.H:356
#define ah_out_of_range_error()
Throws std::out_of_range unconditionally.
Definition ah-errors.H:759
#define EXPECT_THE_MESSAGES_OF(E, base)
#define EXPECT_THE_TEXT(E, statement, text)
#define ITEMS
#define EXPECT_THE_ITEMS(E, call, items)
#define EXPECT_THE_WHOLE(E, call, items)
Space-efficient bit array implementation.
size_t size_t int32_t value
Definition ca-c-api.h:116
size_t size_t int32_t * out
Definition ca-c-api.h:120
Queue implemented with a single dynamic array.
T & put(const T &item)
Copy and put an item in the queue.
Simple dynamic array with automatic resizing and functional operations.
Definition tpl_array.H:141
T & append(const T &data)
Append a copy of data
Definition tpl_array.H:331
Contiguous array of bits.
Definition bitArray.H:201
const T & read(const size_t i) const
Read entry i without allocating memory.
T & touch(const size_t i)
Touch the entry i.
Simple, scalable and fast dynamic array.
T & put(const T &item)
Put a copy of item at the end of the sequence.
Represents a point with rectangular coordinates in a 2D plane.
Definition point.H:221
Contiguous dynamic array with N elements of inline storage.
T & append(const T &item)
Append a copy of item.
The stream of the message of a macro that throws.
Definition ah-errors.H:171
#define TEST(name)
static mpfr_t y
Definition mpfr_mul_d.c:3
void message(const char *file, int line, const char *format,...)
Print an informational message with file and line info.
Definition ahDefs.C:95
constexpr Bit_Column bits(const unsigned n)
Column of n bits without sign: the integers of [0, 2^n - 1].
and
Check uniqueness with explicit hash + equality functors.
void next()
Advance all underlying iterators (bounds-checked).
Definition ah-zip.H:236
std::ostream & operator<<(std::ostream &osObject, const Field< T > &rightOp)
Definition ahField.H:121
STL namespace.
unsigned char Color
Color type for RB nodes.
Definition rbNode.H:71
Circular queue implementations backed by arrays.
Dynamic array container with automatic resizing.
Lazy and scalable dynamic array implementation.
Simple, scalable, contiguous dynamic array.
Dynamic array with inline storage (Aleph::SmallVector).