From 70a54ce3b00f47a312835bdf5477da9e62c6e58e Mon Sep 17 00:00:00 2001 From: Greg Lueck Date: Thu, 7 Aug 2025 11:26:20 -0400 Subject: [PATCH] Explicitly delete handler move/copy constructors Cherry pick #837 from main (cherry picked from commit 9e31f3a9e488e76a5e8b44af4d12aeb54ec2a7e4) --- adoc/chapters/programming_interface.adoc | 18 ------------------ adoc/headers/commandGroupHandler.h | 12 ++++++++---- 2 files changed, 8 insertions(+), 22 deletions(-) diff --git a/adoc/chapters/programming_interface.adoc b/adoc/chapters/programming_interface.adoc index ed46e655f..b73c4b43b 100644 --- a/adoc/chapters/programming_interface.adoc +++ b/adoc/chapters/programming_interface.adoc @@ -14355,9 +14355,6 @@ All of the accessors defined in <> take as a parameter an instance of the <>, and all the kernel invocation functions are member functions of this class. -The constructors of the SYCL [code]#handler# class are described in -<>. - It is disallowed for an instance of the SYCL [code]#handler# class to be moved or copied. @@ -14368,21 +14365,6 @@ include::{header_dir}/commandGroupHandler.h[lines=4..-1] ---- -[[table.constructors.handler]] -.Constructors of the [code]#handler# class -[width="100%",options="header",separator="@",cols="65%,35%"] -|==== -@ Constructor @ Description -a@ -[source] ----- -handler(___unspecified___) ----- - a@ Unspecified implementation-defined constructor. - -|==== - - [[sub.section.requirement]] ==== SYCL functions for adding requirements diff --git a/adoc/headers/commandGroupHandler.h b/adoc/headers/commandGroupHandler.h index cef4565ea..eb828c3d7 100644 --- a/adoc/headers/commandGroupHandler.h +++ b/adoc/headers/commandGroupHandler.h @@ -4,11 +4,15 @@ namespace sycl { class handler { - private: - // implementation defined constructor - handler(___unspecified___); - public: + handler() = delete; + + // A handler cannot be moved or copied. + handler(const handler&) = delete; + handler(handler&&) = delete; + handler& operator=(const handler&) = delete; + handler& operator=(handler&&) = delete; + template void require(