15#ifndef GPUGETCONSTEXPR_H
16#define GPUGETCONSTEXPR_H
19#ifndef GPUCA_GPUCODE_DEVICE
25#if defined(__clang__) && __cplusplus >= 202002L && __cplusplus < 202302L
30#define GPUCA_GET_CONSTEXPR(obj, val) ( \
31 std::is_member_pointer_v<decltype(&std::remove_reference_t<decltype(obj)>::val)> ? o2::gpu::internal::getConstexpr(&std::remove_reference_t<decltype(obj)>::val, o2::gpu::internal::getConstexprHelper<decltype(&std::remove_reference_t<decltype(obj)>::val), decltype(&obj)>(&obj).value) : o2::gpu::internal::getConstexpr(&std::remove_reference_t<decltype(obj)>::val, o2::gpu::internal::getConstexprHelper<decltype(&std::remove_reference_t<decltype(obj)>::val), decltype(&obj)>().value))
33template <
class T,
class S>
34struct getConstexprHelper;
36template <
class T,
class S>
37 requires(!std::is_member_pointer_v<T>)
38struct getConstexprHelper<T, S> {
39 GPUdi() constexpr getConstexprHelper(const
void* =
nullptr) {}
40 static constexpr const void*
value =
nullptr;
43template <
class T,
class S>
44 requires(std::is_member_pointer_v<T>)
45struct getConstexprHelper<T, S> {
46 GPUdi() constexpr getConstexprHelper(const
S&
v) :
value(
v) {}
47 GPUdDefault() constexpr getConstexprHelper() = default;
51GPUdi() constexpr auto getConstexpr(const auto*
v, const
void* =
nullptr)
56GPUdi() constexpr auto getConstexpr(const auto
v, const auto
w)
65#define GPUCA_GET_CONSTEXPR(obj, val) (obj).val
GLsizei const GLfloat * value
GLubyte GLubyte GLubyte GLubyte w