Loading [MathJax]/extensions/tex2jax.js
NiHu
2.0
Main Page
Related Pages
Modules
Namespaces
Namespace List
Namespace Members
All
Functions
Typedefs
Enumerator
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
~
Variables
c
d
f
i
m
n
p
q
r
s
t
v
x
Typedefs
a
b
c
d
e
f
h
i
k
l
m
n
o
p
q
r
s
t
v
w
x
y
Enumerator
d
i
j
k
l
m
n
o
p
q
r
s
t
Files
File List
File Members
All
Functions
Macros
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Modules
Pages
print.hpp
Go to the documentation of this file.
1
// This file is a part of NiHu, a C++ BEM template library.
2
//
3
// Copyright (C) 2012-2014 Peter Fiala <fiala@hit.bme.hu>
4
// Copyright (C) 2012-2014 Peter Rucz <rucz@hit.bme.hu>
5
//
6
// This program is free software: you can redistribute it and/or modify
7
// it under the terms of the GNU General Public License as published by
8
// the Free Software Foundation, either version 3 of the License, or
9
// (at your option) any later version.
10
//
11
// This program is distributed in the hope that it will be useful,
12
// but WITHOUT ANY WARRANTY; without even the implied warranty of
13
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
// GNU General Public License for more details.
15
//
16
// You should have received a copy of the GNU General Public License
17
// along with this program. If not, see <http://www.gnu.org/licenses/>.
18
24
#ifndef PRINT_HPP_INCLUDED
25
#define PRINT_HPP_INCLUDED
26
27
#include "
sequence.hpp
"
28
29
#include <iostream>
30
#include <type_traits>
31
33
template <class Seq, bool = std::is_same<Seq, typename tmp::empty<Seq>::type>::value>
34
struct
print
35
{
37
static
void
eval
(
void
)
38
{
39
std::cout << tmp::deref<typename tmp::begin<Seq>::type>::type::value <<
", "
;
40
print<typename tmp::pop_front<Seq>::type
>
::eval
();
41
}
42
};
43
45
template
<
class
Seq>
46
struct
print
<Seq, true>
47
{
49
static
void
eval
(
void
)
50
{
51
std::cout << std::endl;
52
}
53
};
54
55
#endif
/* PRINT_HPP_INCLUDED */
print
print elements of a compile time sequence
Definition:
print.hpp:34
print::eval
static void eval(void)
the print function
Definition:
print.hpp:37
print< Seq, true >::eval
static void eval(void)
the print function
Definition:
print.hpp:49
sequence.hpp
implementation of compile time sequences
src
tmp
print.hpp
Generated on Sun Apr 6 2025 01:00:17 for NiHu by
1.8.18