Alexandria
2.31.0
SDC-CH common library for the Euclid project
Loading...
Searching...
No Matches
AlexandriaKernel
AlexandriaKernel
serialization
array.h
Go to the documentation of this file.
1
2
/*
3
* Copyright (C) 2012-2021 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
#ifndef ALEXANDRIA_KERNEL_SERIALIZATION_ARRAY_H
21
#define ALEXANDRIA_KERNEL_SERIALIZATION_ARRAY_H
22
23
// Boost, starting from version 1.56, provides serialization for the templated
24
// std::array. This file provides basic serialization support for versions
25
// before that. Note that if the boost version exists it is used instead.
26
27
#include <boost/version.hpp>
28
29
#if (BOOST_VERSION / 100000) <= 1 && ((BOOST_VERSION / 100) % 1000) < 56
30
31
#include <array>
32
33
namespace
boost
{
34
namespace
serialization {
35
36
template
<
class
Archive, std::
size_t
ND,
typename
CellType>
37
void
serialize
(Archive& archive,
std::array<CellType, ND>
& array,
const
unsigned
int
) {
38
for
(
int
i = 0; i < ND; ++i) {
39
archive& array[i];
40
}
41
}
42
43
}
// namespace serialization
44
}
// namespace boost
45
46
#else
47
48
#include <boost/serialization/array.hpp>
49
50
#endif
51
52
#endif
/* ALEXANDRIA_KERNEL_SERIALIZATION_ARRAY_H */
std::array
boost::serialization::serialize
void serialize(Archive &archive, std::array< CellType, ND > &array, const unsigned int)
Definition
array.h:37
boost
Definition
array.h:33
Generated by
1.9.8