Skip to content

Commit ad923c9

Browse files
[SYCL][ABI-Break] Make sycl::exception has_context noexcept (#6597)
According to the SYCL 2020 specification the has_context member in sycl::exception must be noexcept. This commit adds noexcept to the member function. Signed-off-by: Larsen, Steffen <[email protected]>
1 parent 213c82c commit ad923c9

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

sycl/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ set(SYCL_MINOR_VERSION 7)
3030
set(SYCL_PATCH_VERSION 0)
3131
# Don't forget to re-enable sycl_symbols_windows.dump once we leave ABI-breaking
3232
# window!
33-
set(SYCL_DEV_ABI_VERSION 9)
33+
set(SYCL_DEV_ABI_VERSION 10)
3434
if (SYCL_ADD_DEV_VERSION_POSTFIX)
3535
set(SYCL_VERSION_POSTFIX "-${SYCL_DEV_ABI_VERSION}")
3636
endif()

sycl/include/sycl/exception.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ class __SYCL_EXPORT exception : public std::exception {
8989

9090
const char *what() const noexcept final;
9191

92-
bool has_context() const;
92+
bool has_context() const noexcept;
9393

9494
context get_context() const;
9595

sycl/source/exception.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ const std::error_category &exception::category() const noexcept {
7272

7373
const char *exception::what() const noexcept { return MMsg->c_str(); }
7474

75-
bool exception::has_context() const { return (MContext != nullptr); }
75+
bool exception::has_context() const noexcept { return (MContext != nullptr); }
7676

7777
context exception::get_context() const {
7878
if (!has_context())

0 commit comments

Comments
 (0)