The STDEXEC namespace is dependent on the definition of STDEXEC_NAMESPACE, which may be std::execution.
In __config.hpp there exists an unconditional definition of namespace std::execution::parallel_scheduler_replacement. It's unclear to me if this is intended.
In sudoku.cpp STDEXEC_NAMESPACE is locally defined as std::execution. However, this breaks when using STDEXEC_BUILD_PARALLEL_SCHEDULER , because parallel_scheduler_replacement is now built in a separate TU, which is unaware of the local namespace override. This nested namespace ends up in namespace STDEXEC in on TU and in namespace std::execution in another.
I also noticed that STDEXEC_BUILD_PARALLEL_SCHEDULER is not tested in CI, which is probably why this problem has gone unnoticed thus far.
I think the simplest solution here would be to:
- Use
STDEXEC instead of std and nested namespace in sudoku.cpp.
- Define
STDEXEC_BUILD_PARALLEL_SCHEDULER in the CI builds.
- Either remove or document the unconditional
std::execution namespace in __config.hpp.
The STDEXEC namespace is dependent on the definition of
STDEXEC_NAMESPACE, which may bestd::execution.In
__config.hppthere exists an unconditional definition of namespacestd::execution::parallel_scheduler_replacement. It's unclear to me if this is intended.In
sudoku.cppSTDEXEC_NAMESPACEis locally defined asstd::execution. However, this breaks when usingSTDEXEC_BUILD_PARALLEL_SCHEDULER, becauseparallel_scheduler_replacementis now built in a separate TU, which is unaware of the local namespace override. This nested namespace ends up in namespaceSTDEXECin on TU and in namespacestd::executionin another.I also noticed that
STDEXEC_BUILD_PARALLEL_SCHEDULERis not tested in CI, which is probably why this problem has gone unnoticed thus far.I think the simplest solution here would be to:
STDEXECinstead ofstdand nested namespace insudoku.cpp.STDEXEC_BUILD_PARALLEL_SCHEDULERin the CI builds.std::executionnamespace in__config.hpp.