Alexandria
2.14.1
Please provide a description of the project.
AlexandriaKernel
AlexandriaKernel
serialization
array.h
Go to the documentation of this file.
1
2
/*
3
* Copyright (C) 2012-2020 Euclid Science Ground Segment
4
*
5
* This library is free software; you can redistribute it and/or modify it under
6
* the terms of the GNU Lesser General Public License as published by the Free
7
* Software Foundation; either version 3.0 of the License, or (at your option)
8
* any later version.
9
*
10
* This library is distributed in the hope that it will be useful, but WITHOUT
11
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
12
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
13
* details.
14
*
15
* You should have received a copy of the GNU Lesser General Public License
16
* along with this library; if not, write to the Free Software Foundation, Inc.,
17
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18
*/
19
20
21
#ifndef ALEXANDRIA_KERNEL_SERIALIZATION_ARRAY_H
22
#define ALEXANDRIA_KERNEL_SERIALIZATION_ARRAY_H
23
24
// Boost, starting from version 1.56, provides serialization for the templated
25
// std::array. This file provides basic serialization support for versions
26
// before that. Note that if the boost version exists it is used instead.
27
28
#include <boost/version.hpp>
29
30
#if (BOOST_VERSION / 100000) <= 1 && ((BOOST_VERSION / 100) % 1000) < 56
31
32
#include <array>
33
34
namespace
boost
{
35
namespace
serialization {
36
37
template
<
class
Archive, std::
size_t
ND,
typename
CellType>
38
void
serialize
(Archive& archive,
std::array<CellType, ND>
& array,
const
unsigned
int
) {
39
for
(
int
i = 0; i < ND; ++i) {
40
archive & array[i];
41
}
42
}
43
44
}
45
}
46
47
#else
48
49
#include <boost/serialization/array.hpp>
50
51
#endif
52
53
#endif
/* ALEXANDRIA_KERNEL_SERIALIZATION_ARRAY_H */
54
boost
Definition:
array.h:34
boost::serialization::serialize
void serialize(Archive &archive, std::array< CellType, ND > &array, const unsigned int)
Definition:
array.h:38
std::array
STL class.
Generated by
1.8.15