Skip to content

Corrected the docs description of alignment requirement for Lazy<T> - #476

Open
csmyx wants to merge 1 commit into
alibaba:mainfrom
csmyx:patch-1
Open

Corrected the docs description of alignment requirement for Lazy<T>#476
csmyx wants to merge 1 commit into
alibaba:mainfrom
csmyx:patch-1

Conversation

@csmyx

@csmyx csmyx commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Why

According to this static assert, the alignment requirement for type 'T' in 'Lazy' should not exceed 'alignof(std::max_align_t)'.

#if defined(__clang__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wgnu-alignof-expression"
    static_assert(alignof(T) <= alignof(std::max_align_t),
                  "async_simple doesn't allow Lazy with over aligned object");
#endif

What is changing

Corrected the description of the alignment requirement for type 'T' in 'Lazy' that it can not exceed 'alignof(std::max_align_t)'.

Corrected the description of the alignment requirement for type 'T' in 'Lazy<T>' that it can **not** exceed 'alignof(std::max_align_t)'.
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