Skip to content

Add exception header to ur_util.hpp#22649

Open
mccakit wants to merge 1 commit into
intel:syclfrom
mccakit:mccakit-patch-2
Open

Add exception header to ur_util.hpp#22649
mccakit wants to merge 1 commit into
intel:syclfrom
mccakit:mccakit-patch-2

Conversation

@mccakit

@mccakit mccakit commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

ur_util.hpp uses std::exception_ptr by value in exceptionToResult(), but only relies on a forward declaration transitively pulled in by another header. With this libc++/std combination, that transitive include of the full <exception> header no longer happens, so the type is incomplete at the point of use.

Fix

Add an explicit #include <exception> to unified-runtime/source/common/ur_util.hpp so std::exception_ptr is fully defined regardless of what other headers happen to pull in transitively.

Testing

Confirmed ur_common builds successfully with clang++ -std=c++26 against the custom libc++ from LLVM upstream after the change.

`ur_util.hpp` uses `std::exception_ptr` by value in `exceptionToResult()`, but only relies on a forward declaration transitively pulled in by another header. With this libc++/std combination, that transitive include of the full `<exception>` header no longer happens, so the type is incomplete at the point of use.

### Fix
Add an explicit `#include <exception>` to `unified-runtime/source/common/ur_util.hpp` so `std::exception_ptr` is fully defined regardless of what other headers happen to pull in transitively.

### Testing
Confirmed `ur_common` builds successfully with `clang++ -std=c++26` against the custom libc++ from LLVM upstream after the change.
@mccakit
mccakit requested a review from a team as a code owner July 16, 2026 10:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants