Commit ab838a78 authored by Praetorius, Simon's avatar Praetorius, Simon
Browse files

Merge branch 'issue/remove_typetrait_is_template' into 'master'

remove the traits is_template()

See merge request !187
parents cc2acd3c f400b061
Pipeline #4338 canceled with stage
in 24 minutes and 16 seconds
......@@ -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...>,
......
......@@ -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
......
#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;
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment