Commit 712587b8 authored by Philip Trettner's avatar Philip Trettner
Browse files

added aabb_of test to impl-report

parent 1ac6397e
Pipeline #13638 failed with stage
in 6 minutes and 15 seconds
typed-geometry @ ac9db8c4
Subproject commit 53477031cc60ddad2dc130f2a45b0c748e8db249 Subproject commit ac9db8c462fa3f41e84519b97ecfb8bfc9730820
...@@ -54,6 +54,9 @@ using try_contains_pos3 = decltype(contains(std::declval<T const&>(), tg::pos3() ...@@ -54,6 +54,9 @@ using try_contains_pos3 = decltype(contains(std::declval<T const&>(), tg::pos3()
template <class T> template <class T>
using try_uniform = decltype(uniform(detail::rng, std::declval<T const&>())); using try_uniform = decltype(uniform(detail::rng, std::declval<T const&>()));
template <class T>
using try_aabb_of = decltype(aabb_of(std::declval<T const&>()));
template <class ObjT> template <class ObjT>
void test_single_object_type(std::string name) void test_single_object_type(std::string name)
{ {
...@@ -105,10 +108,15 @@ void test_single_object_type(std::string name) ...@@ -105,10 +108,15 @@ void test_single_object_type(std::string name)
else else
static_assert(tg::always_false<D>, "not implemented"); static_assert(tg::always_false<D>, "not implemented");
// only finite objects can be sampled // operations for finite objects
if constexpr (tg::object_traits<ObjT>::is_finite) if constexpr (tg::object_traits<ObjT>::is_finite)
{
if constexpr (!can_apply<try_uniform, ObjT>) if constexpr (!can_apply<try_uniform, ObjT>)
std::cerr << "no uniform(tg::rng, tg::" << name << ")" << std::endl; std::cerr << "no uniform(tg::rng, tg::" << name << ")" << std::endl;
if constexpr (!can_apply<try_aabb_of, ObjT>)
std::cerr << "no aabb_of(tg::" << name << ")" << std::endl;
}
} }
template <template <int, class> class ObjT> template <template <int, class> class ObjT>
......
Supports Markdown
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