dune-common
2.6-git
dune
common
array.hh
Go to the documentation of this file.
1
// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
2
// vi: set et ts=4 sw=2 sts=2:
3
4
#ifndef DUNE_ARRAY_HH
5
#define DUNE_ARRAY_HH
6
7
#ifndef DUNE_COMMON_ARRAY_HH_DISABLE_DEPRECATION_WARNING
8
9
#warning This header is deprecated.
10
#warning Instead of Dune::array, use std::array from <array>.
11
#warning Instead of Dune::make_array(), use Dune::Std::make_array() from <dune/common/std/make_array.hh>.
12
#warning Instead of Dune::fill_array(), use Dune::filledArray() from <dune/common/filledarray.hh>.
13
14
#endif // DUNE_DISABLE_ARRAY_HH_DEPRECATION_WARNING
15
20
#include <array>
21
22
#include <
dune/common/deprecated.hh
>
23
#include <
dune/common/streamoperators.hh
>
24
#include <
dune/common/std/make_array.hh
>
25
26
namespace
Dune
27
{
33
// pull in default implementation
34
// deprecation does not work:
35
// DUNE_DEPRECATED_MSG("Use std::array from <array>")
36
using
std::array;
37
38
// deprecation does not work:
39
// DUNE_DEPRECATED_MSG("Use Dune::Std::make_array from <dune/common/std/make_array.hh>")
40
using
Dune::Std::make_array
;
41
43
50
template
<
typename
T, std::
size_t
n>
51
DUNE_DEPRECATED_MSG
(
"Use Dune::filledArray() from <dune/common/filledarray.hh>"
)
52
std::array<T,n> fill_array(const T& t)
53
{
54
std::array<T,n> r;
55
r.fill(t);
56
return
r;
57
}
58
61
}
// end namespace Dune
62
63
#endif
make_array.hh
Dune
Dune namespace.
Definition:
alignedallocator.hh:9
streamoperators.hh
Implementation of stream operators for std::array and std::tuple.
Dune::DUNE_DEPRECATED_MSG
DUNE_DEPRECATED_MSG("Use Dune::filledArray() from <dune/common/filledarray.hh>") std
Create an array and fill it with copies of the provided value.
Definition:
array.hh:51
Dune::Std::make_array
std::array< typename std::common_type< Args... >::type, sizeof...(Args)> make_array(const Args &... args)
Create and initialize an array.
Definition:
make_array.hh:36
deprecated.hh
Definition of the DUNE_DEPRECATED macro for the case that config.h is not available.
Generated by
1.8.17