Last change
on this file was
16577,
checked in by westram, 7 years ago
|
- full update from 'trunk' into 'alilink'
- adds:
- log:branches/aci@16170:16373,16376:16382,16385:16424,16427:16433
- log:branches/addtest@14319:14326,16193:16316
- log:branches/cleanup@14598:14603
- log:branches/color@14896:14915,14920:15053
- log:branches/consensus@14276:14424
- log:branches/cover@16213:16222
- log:branches/db@15618:15623,15628:15639
- log:branches/dbsave@14521:14555,14558:14576
- log:branches/errhandle@15275:15278
- log:branches/fix@14645:14667,14810:14812,15066:15093,15582:15586,15668:15672,15870:15875,15975:16020,16037:16042,16072:16076,16107:16111,16121:16126,16129:16149
- log:branches/fixres@15127:15175
- log:branches/fixwarn@14815:14832
- log:branches/flags@15098:15222,15225:15287
- log:branches/gde@14670:14785
- log:branches/group@15693:15702,15733:15965,16147:16163
- log:branches/homebrew@14911:14933
- log:branches/io@16436:16563
- log:branches/keys@15591:15690,15706:15730
- log:branches/macros@16484:16507
- log:branches/mladd@15377:15391,15394:15424
- log:branches/pars@15428:15458
- log:branches/random@15551:15558
- log:branches/refactor@15613:15664,15820:15851
- log:branches/remote@14624:14640
- log:branches/saiexport@16023:16118,16229:16233
- log:branches/sanitize@15434:15446
- log:branches/sativa@13071:13201,13203:13240,13242:13262,13264:13273,13275:13303,13305:13344,13346:16571
- log:branches/sync@15291:15339
- log:branches/textedit@16448:16468
- log:branches/tree@15347:15373
- log:branches/ui@14588:14621
- log:branches/unittest@15534:15578,16405:16411
- log:branches/warnings@15468:15483,15486:15512,15515:15519,15521:15528
- log:trunk@14417:16576
|
File size:
1008 bytes
|
Line | |
---|
1 | // =========================================================== // |
---|
2 | // // |
---|
3 | // File : arb_algo.h // |
---|
4 | // Purpose : idioms based on algorithm // |
---|
5 | // // |
---|
6 | // Coded by Ralf Westram (coder@reallysoft.de) in May 2012 // |
---|
7 | // Institute of Microbiology (Technical University Munich) // |
---|
8 | // http://www.arb-home.de/ // |
---|
9 | // // |
---|
10 | // =========================================================== // |
---|
11 | |
---|
12 | #ifndef ARB_ALGO_H |
---|
13 | #define ARB_ALGO_H |
---|
14 | |
---|
15 | #ifndef _GLIBCXX_ALGORITHM |
---|
16 | #include <algorithm> |
---|
17 | #endif |
---|
18 | |
---|
19 | template <typename T> |
---|
20 | CONSTEXPR_INLINE const T& force_in_range(const T& lower_bound, const T& value, const T& upper_bound) { |
---|
21 | return std::min(std::max(lower_bound, value), upper_bound); |
---|
22 | } |
---|
23 | |
---|
24 | #else |
---|
25 | #error arb_algo.h included twice |
---|
26 | #endif // ARB_ALGO_H |
---|
Note: See
TracBrowser
for help on using the repository browser.