From 048c5c32d27538de7a935469c9f0d9b494622c5b Mon Sep 17 00:00:00 2001 From: Jay Kwak <82421531+jkwak-work@users.noreply.github.com> Date: Fri, 28 Jun 2024 19:55:42 -0700 Subject: [PATCH] Adding a note about the keyword, class. (#4503) Closes #4448 --- docs/user-guide/02-conventional-features.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/user-guide/02-conventional-features.md b/docs/user-guide/02-conventional-features.md index b748a72c0d..fe0fdb8542 100644 --- a/docs/user-guide/02-conventional-features.md +++ b/docs/user-guide/02-conventional-features.md @@ -144,6 +144,9 @@ struct MyData > #### Note #### > Slang allows for a trailing semicolon (`;`) on `struct` declarations, but does not require it. +> #### Note #### +> Unlike C/C++, `class` is not a valid keyword for GPU code and it is reserved for CPU/host side logic. + Structure types can have constructors. Constructors are defined with the `__init` keyword: ```hlsl