Debian Codegraph @

blitz/meta/metaprog.h

raw symbols SCIP
1 // -*- C++ -*-cxx . . $ `<file>/blitz/meta/metaprog.h`/
2 /***************************************************************************
3 * blitz/meta/metaprog.h Useful metaprogram declarations
4 *
5 * $Id$
6 *
7 * Copyright (C) 1997-2011 Todd Veldhuizen <[email protected]>
8 *
9 * This file is a part of Blitz.
10 *
11 * Blitz is free software: you can redistribute it and/or modify
12 * it under the terms of the GNU Lesser General Public License
13 * as published by the Free Software Foundation, either version 3
14 * of the License, or (at your option) any later version.
15 *
16 * Blitz is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU Lesser General Public License for more details.
20 *
21 * You should have received a copy of the GNU Lesser General Public
22 * License along with Blitz. If not, see <http://www.gnu.org/licenses/>.
23 *
24 * Suggestions: [email protected]
25 * Bugs: [email protected]
26 *
27 * For more information, please see the Blitz++ Home Page:
28 * https://sourceforge.net/projects/blitz/
29 *
30 ***************************************************************************/
31
32 #ifndef BZ_META_METAPROG_H
33 #define BZ_META_METAPROG_Hcxx . . $ `blitz/meta/metaprog.h:33:9`!
34
35 namespace blitzcxx . . $ blitz/ {
36
37 // Null Operand
38
39 class _bz_meta_nullOperandcxx . . $ blitz/_bz_meta_nullOperand# {
40 public:
41 _bz_meta_nullOperandcxx . . $ blitz/_bz_meta_nullOperand#_bz_meta_nullOperand(49f6e7a06ebc5aa8).() { }
42 };
43
44 template<typename T> inline T operatorcxx . . $ blitz/operator+(6e9d9064cd909d85).+(const T& a, _bz_meta_nullOperandcxx . . $ blitz/_bz_meta_nullOperand#)
45 { return a; }
46 template<typename T> inline T operatorcxx . . $ blitz/`operator*`(6e9d9064cd909d85).*(const T& a, _bz_meta_nullOperandcxx . . $ blitz/_bz_meta_nullOperand#)
47 { return a; }
48
49 // MetaMax
50
51 template<int N1, int N2>
52 class _bz_meta_maxcxx . . $ blitz/_bz_meta_max# {
53 public:
54 static const int maxcxx . . $ blitz/_bz_meta_max#max. = (N1 > N2) ? N1 : N2;
55 };
56
57 // MetaMin
58
59 template<int N1, int N2>
60 class _bz_meta_mincxx . . $ blitz/_bz_meta_min# {
61 public:
62 static const int mincxx . . $ blitz/_bz_meta_min#min. = (N1 < N2) ? N1 : N2;
63 };
64
65 }
66
67 #endif // BZ_META_METAPROG_H