Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@CaseyCarter
Copy link
Contributor

@CaseyCarter CaseyCarter commented Jan 25, 2024

My reference implementation of generator from the proposal. This needs more thorough testing, a quick audit to ensure it meets all the requirements, and a review of the allocator handling. I haven't had time to work on this, so I'm putting it in a feature branch where others can contribute if they like.

Works towards #2936.

@CaseyCarter CaseyCarter added the cxx23 C++23 feature label Jan 25, 2024
@CaseyCarter CaseyCarter requested a review from a team as a code owner January 25, 2024 17:10
@CaseyCarter

This comment was marked as resolved.

* Move `elements_of` into `<ranges>` where it belongs
* Move `_Promise_allocator` into `<generator>` since we have no other standard promise types to reuse it
* Remove lots of now-unnecessary clang-format suppression
Comment on lines +81 to +85
#ifdef __cpp_lib_byte
using _Elements_alloc_type = byte;
#else
using _Elements_alloc_type = char;
#endif
Copy link
Contributor

Choose a reason for hiding this comment

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

Hmm, perhaps we should be consistent on whether there's workaround when __cpp_lib_byte is not defined, see #4337 (comment).

Copy link
Member

Choose a reason for hiding this comment

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

Yeah, this is different than our previous __cpp_lib_byte checks, and is ODR-violation-ish.

Really we need to push for the WinSDK to be fixed, but in the meantime we should definitely think about what to do here.

@StephanTLavavej StephanTLavavej added the generator C++23 generator label Jan 25, 2024
@StephanTLavavej
Copy link
Member

Clang x86 failures:

fatal error: error in backend: failed to perform tail call elimination on a call site marked musttail
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace, preprocessed source, and associated run script.

@CaseyCarter
Copy link
Contributor Author

Clang x86 failures

If you're adding workarounds for one compiler bug while removing workarounds for a different compiler bug, you may be a standard library implementor.

@cpplearner
Copy link
Contributor

Clang x86 failures:

fatal error: error in backend: failed to perform tail call elimination on a call site marked musttail
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace, preprocessed source, and associated run script.

Seems like LLVM-56507?

Drive-by: remove commented-out printf debugging code
@StephanTLavavej
Copy link
Member

Ha, I filed that a year and a half ago and forgot! The bug report is coming from inside the house! 😹

@StephanTLavavej StephanTLavavej merged commit 8055612 into microsoft:feature/generator Jan 26, 2024
@StephanTLavavej
Copy link
Member

Thanks! Checks are green, and I did an extremely cursory review to confirm that all newly added files have our copyright/license banner, so let's get this party started. I also updated the tracking issue to capture your todos.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cxx23 C++23 feature generator C++23 generator

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants