Reference documentation for deal.II version 8.1.0
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Modules
Pages
include
deal.II
base
template_constraints.h
1
// ---------------------------------------------------------------------
2
// @f$Id: template_constraints.h 30154 2013-07-25 10:53:32Z bangerth @f$
3
//
4
// Copyright (C) 2003 - 2013 by the deal.II authors
5
//
6
// This file is part of the deal.II library.
7
//
8
// The deal.II library is free software; you can use it, redistribute
9
// it, and/or modify it under the terms of the GNU Lesser General
10
// Public License as published by the Free Software Foundation; either
11
// version 2.1 of the License, or (at your option) any later version.
12
// The full text of the license can be found in the file LICENSE at
13
// the top level of the deal.II distribution.
14
//
15
// ---------------------------------------------------------------------
16
17
#ifndef __deal2__template_constraints_h
18
#define __deal2__template_constraints_h
19
20
21
#include <deal.II/base/config.h>
22
23
DEAL_II_NAMESPACE_OPEN
24
25
template
<
bool
,
typename
>
struct
constraint_and_return_value
;
26
27
84
template
<
typename
T>
struct
constraint_and_return_value
<true,T>
85
{
86
typedef
T type;
87
};
88
89
90
142
template
<
typename
T>
143
struct
identity
144
{
145
typedef
T type;
146
};
147
148
149
168
struct
PointerComparison
169
{
175
template
<
typename
T>
176
static
bool
equal
(
const
T *p1,
const
T *p2);
177
187
template
<
typename
T,
typename
U>
188
static
bool
equal
(
const
T *,
const
U *);
189
};
190
191
192
193
namespace
internal
194
{
253
template
<
int
N>
254
struct
int2type
255
{};
256
257
263
template
<
bool
B>
264
struct
bool2type
265
{};
266
}
267
268
269
286
template
<
typename
T,
typename
U>
287
struct
types_are_equal
288
{
289
static
const
bool
value =
false
;
290
};
291
292
298
template
<
typename
T>
299
struct
types_are_equal
<T,T>
300
{
301
static
const
bool
value =
true
;
302
};
303
304
305
306
// --------------- inline functions -----------------
307
308
309
template
<
typename
T,
typename
U>
310
inline
311
bool
312
PointerComparison::equal
(
const
T *,
const
U *)
313
{
314
return
false
;
315
}
316
317
318
319
template
<
typename
T>
320
inline
321
bool
322
PointerComparison::equal
(
const
T *p1,
const
T *p2)
323
{
324
return
(p1==p2);
325
}
326
327
328
329
DEAL_II_NAMESPACE_CLOSE
330
331
#endif
identity
Definition:
template_constraints.h:143
constraint_and_return_value
Definition:
template_constraints.h:25
internal::bool2type
Definition:
template_constraints.h:264
PointerComparison::equal
static bool equal(const T *p1, const T *p2)
Definition:
template_constraints.h:322
DEAL_II_NAMESPACE_OPEN
Definition:
mg_transfer.templates.h:35
PointerComparison
Definition:
template_constraints.h:168
internal
Definition:
point_value_history.h:46
internal::int2type
Definition:
template_constraints.h:254
types_are_equal
Definition:
template_constraints.h:287
Generated on Tue Jan 6 2015 18:21:38 for The deal.II Library by
1.8.8