NVIDIA / NVIDIA/stdexec

The type derived from `_ERROR_` should not be considered as `__msuccess`

Open
#976 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
2.4k
Forks
270
Avg merge
3d 6h
Merged PRs (30d)
39

Description

https://github.com/NVIDIA/stdexec/blob/124be2415c4c56f94acf16f1062f339537e62982/include/stdexec/__detail/__meta.hpp#L172-L178

Use overload instead of specialization:

consteval __msuccess __get_ok_type(...);

template <class What, class... With>
consteval _ERROR_<What, With...> __get_ok_type(const _ERROR_<What, With...>*);

template <class _Ty>
extern decltype(__get_ok_type((_Ty*)nullptr)) __ok_v; // Use overload instead of specialization

Use case: https://godbolt.org/z/P1eGccsEY

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with include/stdexec/__detail/__meta.hpp at lines 172-178 and reproduce the reported behavior using the linked Godbolt example. Replace the specialization approach with the proposed overload-based lookup, and verify that a type derived from ERROR is no longer considered __msuccess.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
compilers
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.