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_find.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_FIND_HPP
11
#define SACADO_MPL_FIND_HPP
12
13
#include <type_traits>
14
15
#include "
Sacado_mpl_none.hpp
"
16
#include "
Sacado_mpl_begin.hpp
"
17
#include "
Sacado_mpl_end.hpp
"
18
#include "
Sacado_mpl_deref.hpp
"
19
#include "
Sacado_mpl_next.hpp
"
20
#include "
Sacado_mpl_if.hpp
"
21
22
namespace
Sacado {
23
24
namespace
mpl {
25
26
template
<
class
Seq,
class
T>
27
class
TypeSequenceDoesNotContainType
{};
28
29
template
<
class
Seq,
30
class
T
,
31
class
Iter1 =
typename
mpl::begin<Seq>::type
,
32
class
Iter2 =
typename
mpl::end<Seq>::type
>
33
struct
find
{
34
typedef
typename
35
mpl::mpl_if< std::is_same<typename mpl::deref<Iter1>::type
,
T
>,
36
Iter1,
37
find<Seq, T, typename mpl::next<Iter1>::type
,
38
Iter2> >
::type
type
;
39
static
const
int
value
=
type::value
;
40
};
41
42
template
<
class
Seq,
class
T,
class
Iter1>
43
struct
find
<Seq,
T
, Iter1, Iter1> {
44
static
const
int
value
=
TypeSequenceDoesNotContainType<Seq,T>::value
;
45
};
46
47
}
48
49
}
50
51
#endif // SACADO_MPL_FIND_HPP
Sacado_mpl_begin.hpp
Sacado_mpl_deref.hpp
Sacado_mpl_if.hpp
Sacado::mpl::TypeSequenceDoesNotContainType
Definition:
Sacado_mpl_find.hpp:27
Sacado::mpl::end
Definition:
Sacado_mpl_end.hpp:20
Sacado::mpl::find::type
mpl::mpl_if< std::is_same< typename mpl::deref< Iter1 >::type, T >, Iter1, find< Seq, T, typename mpl::next< Iter1 >::type, Iter2 > >::type type
Definition:
Sacado_mpl_find.hpp:38
Sacado_mpl_end.hpp
T
#define T
Definition:
Sacado_rad.hpp:553
Sacado::mpl::begin
Definition:
Sacado_mpl_begin.hpp:20
Sacado::mpl::find::value
static const int value
Definition:
Sacado_mpl_find.hpp:39
value
int value
Definition:
gmock-matchers_test.cc:664
Sacado::mpl::find
Definition:
Sacado_mpl_find.hpp:33
Sacado::mpl::mpl_if
Definition:
Sacado_mpl_if.hpp:25
Sacado_mpl_next.hpp
Sacado_mpl_none.hpp
Generated on Tue Nov 12 2024 09:21:52 for Sacado Package Browser (Single Doxygen Collection) by
1.8.5