tlx
Loading...
Searching...
No Matches
array.hpp
Go to the documentation of this file.
1
/*******************************************************************************
2
* tlx/logger/array.hpp
3
*
4
* Part of tlx - http://panthema.net/tlx
5
*
6
* Copyright (C) 2018 Timo Bingmann <tb@panthema.net>
7
*
8
* All rights reserved. Published under the Boost Software License, Version 1.0
9
******************************************************************************/
10
11
#ifndef TLX_LOGGER_ARRAY_HEADER
12
#define TLX_LOGGER_ARRAY_HEADER
13
14
#include <
tlx/logger/core.hpp
>
15
16
#include <array>
17
18
namespace
tlx
{
19
20
template
<
typename
T,
size_t
N>
21
class
LoggerFormatter
<
std
::array<T, N> >
22
{
23
public
:
24
static
void
print
(std::ostream& os,
const
std::array<T, N>& data) {
25
os <<
'['
;
26
for
(
typename
std::array<T, N>::const_iterator it = data.begin();
27
it != data.end(); ++it)
28
{
29
if
(it != data.begin()) os <<
','
;
30
LoggerFormatter<T>::print
(os, *it);
31
}
32
os <<
']'
;
33
}
34
};
35
36
}
// namespace tlx
37
38
#endif
// !TLX_LOGGER_ARRAY_HEADER
39
40
/******************************************************************************/
tlx::LoggerFormatter< std::array< T, N > >::print
static void print(std::ostream &os, const std::array< T, N > &data)
Definition
array.hpp:24
tlx::LoggerFormatter
template class for formatting. contains a print() method.
Definition
core.hpp:25
core.hpp
std
STL namespace.
tlx
Definition
exclusive_scan.hpp:17
tlx
logger
array.hpp
Generated on Sat Jul 22 2023 00:00:00 for tlx by
1.9.8