Skip to content

Feature/any all#387

Closed
stevenrbrandt wants to merge 4 commits into
mainfrom
feature/any-all
Closed

Feature/any all#387
stevenrbrandt wants to merge 4 commits into
mainfrom
feature/any-all

Conversation

@stevenrbrandt

Copy link
Copy Markdown
Contributor

This PR allows the code despite a compiler bug in cuda 12.9.1 https://bitbucket.org/einsteintoolkit/tickets/issues/2922/carpetx-does-not-compile-with-cuda-129

It moves any/all to namespaces and fully qualifies their use in a few cases.

@rhaas80 rhaas80 requested a review from eschnett May 25, 2026 14:46
@rhaas80

rhaas80 commented May 25, 2026

Copy link
Copy Markdown
Member

LGTM

@eschnett

Copy link
Copy Markdown
Collaborator

I believe my recent PR that removes using namespace std fixes this. The problem is that C++23 defines a class std::any (and std::all), and this class is accidentally in scope because some header files use using namespace std. This is also the reason why things are failing only for any and all, and not for any of the other functions.

@rhaas80

rhaas80 commented May 25, 2026

Copy link
Copy Markdown
Member

I see. So the nvcc compiler on the failing cluster defaulted (or faultily used) to C++23 (since we should be asking for -std=c++17?

@eschnett

Copy link
Copy Markdown
Collaborator

I think the compiler is using C++17, but the standard library is using C++23, probably simply because you're using a newer version of GCC (or nvcc).

@rhaas80

rhaas80 commented May 26, 2026

Copy link
Copy Markdown
Member

I believe my recent PR that removes using namespace std fixes this. The problem is that C++23 defines a class std::any (and std::all), and this class is accidentally in scope because some header files use using namespace std. This is also the reason why things are failing only for any and all, and not for any of the other functions.

#381 is the PR? That pull request unfortunately has build failures (missing std:: in setprecision call in some io thorn. I will try and update it.

@rhaas80 rhaas80 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Superseded by #381

@rhaas80

rhaas80 commented May 26, 2026

Copy link
Copy Markdown
Member

Superseded by #381

@rhaas80 rhaas80 closed this May 26, 2026
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.

3 participants