Skip to content
Snippets Groups Projects
Commit 0e4bc6a0 authored by Lebrun-Grandie, Damien's avatar Lebrun-Grandie, Damien
Browse files

Add test for has_access_traits

parent 854666d2
No related branches found
No related tags found
1 merge request!113Improve error messages in BVH constructor and BVH::query()
#include <ArborX_DetailsConcepts.hpp>
#include <Kokkos_Core.hpp>
#include <tuple>
using ArborX::Box;
......@@ -46,4 +48,38 @@ static_assert(std::is_same<first_template_parameter_t<std::tuple<int, float>>,
int>::value,
"");
using ArborX::Details::has_access_traits;
using ArborX::Traits::PredicatesTag;
using ArborX::Traits::PrimitivesTag;
struct HasNoAccessTraitsSpecialization
{
};
struct HasEmptySpecialization
{
};
namespace ArborX
{
namespace Traits
{
template <typename Tag>
struct Access<HasEmptySpecialization, Tag>
{
};
} // namespace Traits
} // namespace ArborX
static_assert(has_access_traits<Kokkos::View<double *>, PrimitivesTag>::value,
"");
static_assert(has_access_traits<Kokkos::View<double *>, PredicatesTag>::value,
"");
static_assert(
!has_access_traits<HasNoAccessTraitsSpecialization, PrimitivesTag>::value,
"");
static_assert(
!has_access_traits<HasNoAccessTraitsSpecialization, PredicatesTag>::value,
"");
static_assert(has_access_traits<HasEmptySpecialization, PrimitivesTag>::value,
"");
static_assert(has_access_traits<HasEmptySpecialization, PredicatesTag>::value,
"");
int main() {}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment