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
Nils-Arne Dreier
dune-common
Commits
f79405c2
Commit
f79405c2
authored
14 years ago
by
Jorrit Fahlke
Browse files
Options
Downloads
Patches
Plain Diff
[remove_reference] New type transformation class to remove references from
types. [[Imported from SVN: r6078]]
parent
aec05d6b
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
dune/common/typetraits.hh
+21
-0
21 additions, 0 deletions
dune/common/typetraits.hh
with
21 additions
and
0 deletions
dune/common/typetraits.hh
+
21
−
0
View file @
f79405c2
...
...
@@ -170,6 +170,27 @@ namespace Dune
};
#endif
#if defined HAVE_TYPE_TRAITS
using
std
::
remove_reference
;
#elif defined HAVE_TR1_TYPE_TRAITS
using
std
::
tr1
::
remove_reference
;
#else
//! Remove a reference from a type
/**
* If the template parameter \c T matches \c T1&, then the member typedef \c
* type is \c T1, otherwise it is \c T.
*/
template
<
typename
T
>
struct
remove_reference
{
//! T with references removed
typedef
T
type
;
};
# ifndef DOXYGEN
template
<
typename
T
>
struct
remove_reference
<
T
&>
{
typedef
T
type
;
};
# endif // ! defined(DOXYGEN)
#endif
/**
* @brief Checks wether a type is convertible to another.
*
...
...
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