Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Praetorius, Simon
dune-amdis
Commits
49e6913c
Commit
49e6913c
authored
Mar 01, 2019
by
Praetorius, Simon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added remove_cvref_t type-traits
parent
753849bf
Pipeline
#1766
failed with stage
in 1 minute and 45 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
0 deletions
+18
-0
src/amdis/common/TypeTraits.hpp
src/amdis/common/TypeTraits.hpp
+18
-0
No files found.
src/amdis/common/TypeTraits.hpp
View file @
49e6913c
...
...
@@ -12,6 +12,24 @@
namespace
AMDiS
{
/// \brief Remove cv and ref qualifiers of type T.
/**
* If the type T is a reference type, provides the member typedef type which
* is the type referred to by T with its topmost cv-qualifiers removed.
* Otherwise type is T with its topmost cv-qualifiers removed.
*
* Note: This is a backport of c++20 std::remove_cvref
**/
template
<
class
T
>
struct
remove_cvref
{
using
type
=
std
::
remove_cv_t
<
std
::
remove_reference_t
<
T
>>
;
};
/// Helper alias template for \ref remove_cvref
template
<
class
T
>
using
remove_cvref_t
=
typename
remove_cvref
<
T
>::
type
;
namespace
Impl
{
template
<
class
T
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment