Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
amdis-core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
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
amdis
amdis-core
Commits
227d7857
Commit
227d7857
authored
6 years ago
by
Praetorius, Simon
Browse files
Options
Downloads
Patches
Plain Diff
added missing includes
parent
49e6913c
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/amdis/common/FieldMatVec.hpp
+2
-0
2 additions, 0 deletions
src/amdis/common/FieldMatVec.hpp
src/amdis/common/TypeTraits.hpp
+5
-5
5 additions, 5 deletions
src/amdis/common/TypeTraits.hpp
with
7 additions
and
5 deletions
src/amdis/common/FieldMatVec.hpp
+
2
−
0
View file @
227d7857
...
@@ -7,6 +7,8 @@
...
@@ -7,6 +7,8 @@
#include
<dune/common/fvector.hh>
#include
<dune/common/fvector.hh>
#include
<dune/common/typetraits.hh>
#include
<dune/common/typetraits.hh>
#include
<amdis/common/TypeTraits.hpp>
namespace
std
namespace
std
{
{
template
<
class
T
,
int
N
>
template
<
class
T
,
int
N
>
...
...
This diff is collapsed.
Click to expand it.
src/amdis/common/TypeTraits.hpp
+
5
−
5
View file @
227d7857
...
@@ -35,13 +35,13 @@ namespace AMDiS
...
@@ -35,13 +35,13 @@ namespace AMDiS
template
<
class
T
>
template
<
class
T
>
struct
UnderlyingType
struct
UnderlyingType
{
{
using
type
=
T
;
using
type
=
remove_cvref_t
<
T
>
;
};
};
template
<
class
T
>
template
<
class
T
>
struct
UnderlyingType
<
std
::
reference_wrapper
<
T
>>
struct
UnderlyingType
<
std
::
reference_wrapper
<
T
>>
{
{
using
type
=
T
;
using
type
=
remove_cvref_t
<
T
>
;
};
};
}
}
...
@@ -53,7 +53,7 @@ namespace AMDiS
...
@@ -53,7 +53,7 @@ namespace AMDiS
#define FWD(obj) std::forward<decltype(obj)>(obj)
#define FWD(obj) std::forward<decltype(obj)>(obj)
/// A decay version of decltype, similar to GCCs __typeof__
/// A decay version of decltype, similar to GCCs __typeof__
#define TYPEOF(...) remove_cvref_t<decltype(__VA_ARGS__)>
#define TYPEOF(...)
AMDiS::
remove_cvref_t<decltype(__VA_ARGS__)>
/// Extract the static value of an integral_constant variable
/// Extract the static value of an integral_constant variable
#define VALUE(...) TYPEOF(__VA_ARGS__)::value
#define VALUE(...) TYPEOF(__VA_ARGS__)::value
...
@@ -65,7 +65,7 @@ namespace AMDiS
...
@@ -65,7 +65,7 @@ namespace AMDiS
struct
Types
{};
struct
Types
{};
template
<
class
...
Ts
>
template
<
class
...
Ts
>
using
Types_t
=
Types
<
std
::
decay
_t
<
Ts
>
...
>
;
using
Types_t
=
Types
<
remove_cvref
_t
<
Ts
>
...
>
;
/// Alias that indicates ownership of resources
/// Alias that indicates ownership of resources
...
@@ -77,7 +77,7 @@ namespace AMDiS
...
@@ -77,7 +77,7 @@ namespace AMDiS
template
<
class
Obj
>
template
<
class
Obj
>
auto
makeUniquePtr
(
Obj
&&
obj
)
auto
makeUniquePtr
(
Obj
&&
obj
)
{
{
return
std
::
make_unique
<
remove_cvref_t
<
O
bj
>
>
(
FWD
(
obj
));
return
std
::
make_unique
<
TYPEOF
(
o
bj
)
>
(
FWD
(
obj
));
}
}
}
// end namespace AMDiS
}
// end namespace AMDiS
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