diff --git a/openmp/libomptarget/include/dlwrap.h b/openmp/libomptarget/include/dlwrap.h --- a/openmp/libomptarget/include/dlwrap.h +++ b/openmp/libomptarget/include/dlwrap.h @@ -127,6 +127,10 @@ return {{dlwrap::type::symbol::call()...}}; } +template constexpr void verboseAssert() { + static_assert(Requested == Required, "Arity Error"); +} + } // namespace dlwrap #define DLWRAP_INSTANTIATE(SYM_USE, SYM_DEF, ARITY) \ @@ -153,12 +157,12 @@ struct SYMBOL##_Trait : public dlwrap::trait { \ using T = dlwrap::trait; \ static T::FunctionType get() { \ + verboseAssert::nargs>(); \ constexpr size_t Index = DLWRAP_ID() - 1; \ void *P = *dlwrap::pointer(Index); \ return reinterpret_cast(P); \ } \ }; \ - static_assert(ARITY == trait::nargs, "Arity Error"); \ } #define DLWRAP_IMPL(SYMBOL, ARITY) \