diff --git a/sycl/include/sycl/ext/oneapi/device_global/device_global.hpp b/sycl/include/sycl/ext/oneapi/device_global/device_global.hpp index b484af8acf6ba..0e74036f4012c 100644 --- a/sycl/include/sycl/ext/oneapi/device_global/device_global.hpp +++ b/sycl/include/sycl/ext/oneapi/device_global/device_global.hpp @@ -40,6 +40,8 @@ namespace sycl { inline namespace _V1 { namespace ext::oneapi::experimental { +template class device_global; + namespace detail { // Type-trait for checking if a type defines `operator->`. template @@ -49,10 +51,19 @@ struct HasArrowOperator().operator->())>> : std::true_type {}; +template +class device_global_base; + // Checks that T is a reference to either device_global or // device_global_base. This is used by the variadic ctor to allow copy ctors to // take preference. template struct IsDeviceGlobalOrBaseRef : std::false_type {}; +template +struct IsDeviceGlobalOrBaseRef &> + : std::true_type {}; +template +struct IsDeviceGlobalOrBaseRef &> + : std::true_type {}; // Base class for device_global. template @@ -179,10 +190,6 @@ class device_global_base< } }; -template -struct IsDeviceGlobalOrBaseRef &> - : std::true_type {}; - } // namespace detail template @@ -305,12 +312,6 @@ class } }; -namespace detail { -template -struct IsDeviceGlobalOrBaseRef &> - : std::true_type {}; -} // namespace detail - } // namespace ext::oneapi::experimental } // namespace _V1 } // namespace sycl