Skip to content

Fix unused template warning - #2381

Open
ispeters wants to merge 1 commit into
NVIDIA:mainfrom
ispeters:fix-unused-template
Open

ispeters wants to merge 1 commit into
NVIDIA:mainfrom
ispeters:fix-unused-template

Conversation

@ispeters

Copy link
Copy Markdown
Contributor

When building test/exec/sequence/test_write_env_sequence.cpp with my local Mac build environment (Clang 23.1.0), I get the following build errors:

test/exec/sequence/test_write_env_sequence.cpp:253:10: error: unused
function template 'set_next' [-Werror,-Wunused-template]
  253 |     auto set_next(Item&& item) noexcept
      |          ^~~~~~~~
test/exec/sequence/test_write_env_sequence.cpp:263:10: error: unused
function template 'set_error' [-Werror,-Wunused-template]
  263 |     void set_error(Error&&) noexcept
      |          ^~~~~~~~~
2 errors generated.

This diff fixes the problem by marking the two problematic member functions with [[maybe_unused]]. I did this rather than delete them so that the containing class remains a sequence sender.

@copy-pr-bot

copy-pr-bot Bot commented Oct 28, 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.

When building `test/exec/sequence/test_write_env_sequence.cpp` with my
local Mac build environment (Clang 23.1.0), I get the following build
errors:
```
test/exec/sequence/test_write_env_sequence.cpp:253:10: error: unused
function template 'set_next' [-Werror,-Wunused-template]
  253 |     auto set_next(Item&& item) noexcept
      |          ^~~~~~~~
test/exec/sequence/test_write_env_sequence.cpp:263:10: error: unused
function template 'set_error' [-Werror,-Wunused-template]
  263 |     void set_error(Error&&) noexcept
      |          ^~~~~~~~~
2 errors generated.
```

This diff fixes the problem by marking the two problematic member
functions with `[[maybe_unused]]`. I did this rather than delete them so
that the containing class remains a sequence sender.
@ispeters
ispeters force-pushed the fix-unused-template branch from 6f2904d to 730537a Compare October 29, 2026 02:24

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.

1 participant