Sacado Package Browser (Single Doxygen Collection)
Version of the Day
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
src
mpl
Sacado_mpl_vector.hpp
Go to the documentation of this file.
1
// @HEADER
2
// *****************************************************************************
3
// Sacado Package
4
//
5
// Copyright 2006 NTESS and the Sacado contributors.
6
// SPDX-License-Identifier: LGPL-2.1-or-later
7
// *****************************************************************************
8
// @HEADER
9
10
#ifndef SACADO_MPL_VECTOR_HPP
11
#define SACADO_MPL_VECTOR_HPP
12
13
#include "
Sacado_ConfigDefs.h
"
14
15
#include "
Sacado_mpl_none.hpp
"
16
#include "
Sacado_mpl_size.hpp
"
17
#include "
Sacado_mpl_begin.hpp
"
18
#include "
Sacado_mpl_end.hpp
"
19
#include "
Sacado_mpl_next.hpp
"
20
#include "
Sacado_mpl_push_back.hpp
"
21
#include "
Sacado_mpl_at.hpp
"
22
#include "
Sacado_mpl_deref.hpp
"
23
24
// Specializations needed for various mpl operations
25
#include "
Sacado_mpl_vector_size_spec.hpp
"
26
27
namespace
Sacado {
28
29
namespace
mpl {
30
31
// vector tag for mpl operations
32
struct
vector_tag
{};
33
34
// vector
35
template
<
typename
... Args>
36
struct
vector
:
37
vector_size
<Args...> {
38
typedef
vector_tag
tag
;
39
typedef
vector
type
;
40
};
41
42
// iterator
43
template
<
class
Vector,
int
Pos>
44
struct
vector_iterator
{
45
static
const
int
value
= Pos;
46
};
47
48
// size
49
template
<>
50
struct
size_impl
<
vector_tag
> {
51
template
<
class
Vector>
52
struct
apply
{
53
static
const
int
value
= Vector::sz;
54
};
55
};
56
57
// begin
58
template
<>
59
struct
begin_impl
<
vector_tag
> {
60
template
<
class
Vector>
61
struct
apply
{
62
typedef
vector_iterator<Vector,0>
type
;
63
};
64
};
65
66
// end
67
template
<>
68
struct
end_impl
<
vector_tag
> {
69
template
<
class
Vector>
70
struct
apply
{
71
typedef
vector_iterator<Vector,Vector::sz>
type
;
72
};
73
};
74
75
// next
76
template
<
class
Vector,
int
Pos>
77
struct
next
<
vector_iterator
<Vector,Pos> > {
78
typedef
vector_iterator<Vector,Pos+1>
type
;
79
};
80
81
// deref
82
template
<
class
Vector,
int
Pos>
83
struct
deref
<
vector_iterator
<Vector,Pos> > :
mpl::at
<Vector,Pos> {};
84
85
}
86
87
}
88
89
#include "
Sacado_mpl_vector_at_spec.hpp
"
90
#include "
Sacado_mpl_vector_push_back_spec.hpp
"
91
92
namespace
Sacado {
93
namespace
mpl {
94
95
// at
96
template
<
int
Pos>
97
struct
at_impl
<
vector_tag
, Pos> {
98
template
<
class
Vector>
99
struct
apply
:
vector_at
<Vector,Pos> {};
100
};
101
102
// push_back
103
template
<>
104
struct
push_back_impl
<
vector_tag
> {
105
template
<
class
Vector,
class
T>
106
struct
apply
:
vector_push_back
<Vector, T> {};
107
};
108
109
}
110
}
111
112
#endif
Sacado::mpl::at_impl
Definition:
Sacado_mpl_at.hpp:17
Sacado_mpl_vector_at_spec.hpp
Sacado_mpl_begin.hpp
Sacado_mpl_deref.hpp
Sacado_mpl_push_back.hpp
Sacado::mpl::at
Definition:
Sacado_mpl_at.hpp:20
Sacado::mpl::vector::tag
vector_tag tag
Definition:
Sacado_mpl_vector.hpp:38
Sacado::mpl::vector_push_back
Definition:
Sacado_mpl_vector_push_back_spec.hpp:18
Sacado::mpl::begin_impl< vector_tag >::apply::type
vector_iterator< Vector, 0 > type
Definition:
Sacado_mpl_vector.hpp:62
Sacado::mpl::vector
Definition:
Sacado_mpl_vector.hpp:36
Sacado::mpl::size_impl
Definition:
Sacado_mpl_size.hpp:17
Sacado_mpl_end.hpp
Sacado::mpl::vector_size
Definition:
Sacado_mpl_vector_size_spec.hpp:18
Sacado::mpl::next
Definition:
Sacado_mpl_next.hpp:17
Sacado_mpl_size.hpp
Sacado::mpl::push_back_impl
Definition:
Sacado_mpl_push_back.hpp:17
Sacado::mpl::vector_iterator::value
static const int value
Definition:
Sacado_mpl_vector.hpp:45
Sacado_mpl_vector_size_spec.hpp
Sacado::mpl::begin_impl
Definition:
Sacado_mpl_begin.hpp:17
Sacado::mpl::vector_at
Definition:
Sacado_mpl_vector_at_spec.hpp:17
Sacado::mpl::end_impl
Definition:
Sacado_mpl_end.hpp:17
Sacado::mpl::next< vector_iterator< Vector, Pos > >::type
vector_iterator< Vector, Pos+1 > type
Definition:
Sacado_mpl_vector.hpp:78
Sacado::mpl::vector::type
vector type
Definition:
Sacado_mpl_vector.hpp:39
value
int value
Definition:
gmock-matchers_test.cc:664
Sacado::mpl::end_impl< vector_tag >::apply::type
vector_iterator< Vector, Vector::sz > type
Definition:
Sacado_mpl_vector.hpp:71
Sacado::mpl::vector_iterator
Definition:
Sacado_mpl_vector.hpp:44
Sacado_ConfigDefs.h
Sacado_mpl_at.hpp
Sacado::mpl::vector_tag
Definition:
Sacado_mpl_vector.hpp:32
Sacado::mpl::deref
Definition:
Sacado_mpl_deref.hpp:17
Sacado_mpl_vector_push_back_spec.hpp
Sacado::mpl::apply
Definition:
Sacado_mpl_apply.hpp:45
Sacado_mpl_next.hpp
Sacado_mpl_none.hpp
Generated on Fri Dec 20 2024 09:23:42 for Sacado Package Browser (Single Doxygen Collection) by
1.8.5