Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve implementation of destructible #157

Merged
merged 1 commit into from
Jul 6, 2023

Conversation

miscco
Copy link
Collaborator

@miscco miscco commented Jul 3, 2023

Our implementation worked around some issues with older gcc.

However, those break when used with more complex ranges concepts. We can work around this by just falling back to is_destructible in that case and go our merry way.

While we are at it also simplify the implementation a bit and add _LIBCUDACXX_INLINE_VAR

@miscco miscco requested review from ericniebler and griwes July 3, 2023 07:23
@miscco miscco force-pushed the improve_destructible_concept branch 3 times, most recently from a61f684 to 9b484f6 Compare July 3, 2023 10:05
We did not apply this for old gcc compilers, but it turns out that they will fall over more complex ranges concepts later.

We can alleviate this by reusing `is_destructible` and generally clean the implementation up.
@miscco miscco force-pushed the improve_destructible_concept branch from 9b484f6 to caf02fb Compare July 3, 2023 10:06
@miscco miscco linked an issue Jul 3, 2023 that may be closed by this pull request
24 tasks
@miscco miscco linked an issue Jul 3, 2023 that may be closed by this pull request
@miscco miscco merged commit caf02fb into NVIDIA:monorepo Jul 6, 2023
@ericniebler
Copy link
Collaborator

I'm a little late to the game here, but this looks good. Clang, NVHPC, and MSVC have an intrinsic for this that we could use to speed things up: __is_nothrow_destructible(T).

https://godbolt.org/z/66GsPfEqo

@miscco miscco deleted the improve_destructible_concept branch February 26, 2025 11:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants