Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dune-common
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Timo Koch
dune-common
Commits
49a21131
Commit
49a21131
authored
18 years ago
by
Oliver Sander
Browse files
Options
Downloads
Patches
Plain Diff
introducing is_same as a replacement for SameType
[[Imported from SVN: r4847]]
parent
b241e75a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
common/typetraits.hh
+24
-0
24 additions, 0 deletions
common/typetraits.hh
with
24 additions
and
0 deletions
common/typetraits.hh
+
24
−
0
View file @
49a21131
...
@@ -276,10 +276,34 @@ namespace Dune
...
@@ -276,10 +276,34 @@ namespace Dune
:
public
EnableIf
<
IsInteroperable
<
T1
,
T2
>::
value
,
Type
>
:
public
EnableIf
<
IsInteroperable
<
T1
,
T2
>::
value
,
Type
>
{};
{};
#ifdef HAVE_TR1_TYPE_TRAITS
using
std
::
tr1
::
is_same
;
#else
/**
* @brief Compile time test for testing whether
* two types are the same.
*/
template
<
typename
T1
,
typename
T2
>
struct
is_same
{
enum
{
/* @brief Whether T1 is the same type as T2. */
value
=
false
};
};
template
<
typename
T
>
struct
is_same
<
T
,
T
>
{
enum
{
value
=
true
};
};
#endif
/**
/**
* @brief Compile time test for testing whether
* @brief Compile time test for testing whether
* two types are the same.
* two types are the same.
* \deprecated Use is_same instead
*/
*/
template
<
typename
T1
,
typename
T2
>
template
<
typename
T1
,
typename
T2
>
struct
SameType
struct
SameType
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment