Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
amdis
amdis-core
Commits
f400b061
Commit
f400b061
authored
Jul 10, 2020
by
Praetorius, Simon
Browse files
remove the traits is_template()
parent
883e5723
Changes
3
Show whitespace changes
Inline
Side-by-side
amdis/common/TypeTraits.hpp
View file @
f400b061
...
...
@@ -97,21 +97,6 @@ namespace AMDiS
return
std
::
make_unique
<
TYPEOF
(
obj
)
>
(
FWD
(
obj
));
}
/// Check whether template parameter is a template-template
template
<
template
<
class
...
>
class
>
constexpr
bool
is_template
()
{
return
true
;
}
template
<
template
<
auto
...>
class
>
constexpr
bool
is_template
()
{
return
true
;
}
template
<
template
<
class
,
auto
,
auto
...>
class
>
constexpr
bool
is_template
()
{
return
true
;
}
template
<
class
>
constexpr
bool
is_template
()
{
return
false
;
}
template
<
bool
...
b
>
using
enable_if_all_t
=
std
::
enable_if_t
<
std
::
is_same_v
<
std
::
integer_sequence
<
bool
,
true
,
b
...
>
,
...
...
test/CMakeLists.txt
View file @
f400b061
...
...
@@ -145,9 +145,6 @@ dune_add_test(SOURCES TreeDataTest.cpp
dune_add_test
(
SOURCES TreeContainerTest.cpp
LINK_LIBRARIES amdis
)
dune_add_test
(
SOURCES TypeTraitsTest.cpp
LINK_LIBRARIES amdis
)
dune_add_test
(
SOURCES UniqueBorderPartitionTest.cpp
LINK_LIBRARIES amdis
MPI_RANKS 2
...
...
test/TypeTraitsTest.cpp
deleted
100644 → 0
View file @
883e5723
#include
<amdis/AMDiS.hpp>
#include
<amdis/common/TypeTraits.hpp>
using
namespace
AMDiS
;
template
<
std
::
size_t
i
>
struct
A
{};
template
<
class
T
>
struct
B
{};
template
<
class
T
,
std
::
size_t
i
>
struct
C
{};
struct
D
{};
int
main
(
int
argc
,
char
**
argv
)
{
Environment
env
(
argc
,
argv
);
static_assert
(
is_template
<
A
>
(),
""
);
static_assert
(
is_template
<
B
>
(),
""
);
static_assert
(
is_template
<
C
>
(),
""
);
static_assert
(
not
is_template
<
std
::
size_t
>
(),
""
);
static_assert
(
not
is_template
<
D
>
(),
""
);
return
0
;
}
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment