Skip to content

Address -Wdeprecated-declarations - #2299

Open
ispeters wants to merge 1 commit into
NVIDIA:mainfrom
ispeters:address-deprecation-warning
Open

ispeters wants to merge 1 commit into
NVIDIA:mainfrom
ispeters:address-deprecation-warning

Conversation

@ispeters

@ispeters ispeters commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

When building with Clang 23+, test_any_sender.cpp fails to compile because one of the test cases instantiates a deprecated class template (exec::any_receiver_ref) inside std::is_constructible_v. For some reason, the file-wide -Wno-deprecated-declarations pragma doesn't suppress the warning, perhaps because the instantiation of the deprecated class template happens inside the standard library.

The error looks like this:

error:
'any_receiver_ref<std::execution::completion_signatures<std::execution::set_value_t ()>>'
is deprecated: use exec::any_receiver<Sigs, ReceiverQueries> instead
[-Werror,-Wdeprecated-declarations]
   27 | ... inline constexpr bool is_constructible_v = __is_constructible(_Tp, _Args...);
      |                                                ^

This diff suppresses the warning by forcing the first class template instantiation to be inside the blanket suppression (with an otherwise-useless static_assert(sizeof(type) != 0)) so that the subsequent use of std::is_constructible_v doesn't re-trigger the warning.

When building with Clang 23+, `test_any_sender.cpp` fails to compile
because one of the test cases instatiates a deprecated class template
(`exec::any_receiver_ref`) inside `std::is_constructible_v`. For some
reason, the file-wide `-Wno-deprecated-declarations` pragma doesn't
suppress the warning, perhaps because the instantiation of the
deprecated class template happens inside the standard library.

The error looks like this:
```
error:
'any_receiver_ref<std::execution::completion_signatures<std::execution::set_value_t ()>>'
is deprecated: use exec::any_receiver<Sigs, ReceiverQueries> instead
[-Werror,-Wdeprecated-declarations]
   27 | ... inline constexpr bool is_constructible_v = __is_constructible(_Tp, _Args...);
      |                                                ^
```

This diff suppresses the warning by forcing the first class template
instantiation to be inside the blanket suppression (with an
otherwise-useless `static_assert(sizeof(type) != 0)`) so that the
subsequent use of `std::is_constructible_v` doesn't re-trigger the
warning.
@copy-pr-bot

copy-pr-bot Bot commented Oct 3, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@ericniebler

Copy link
Copy Markdown
Collaborator

/ok to test ce19cb2

This branch has not been deployed

No deployments
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