Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

constexpr for std::array Comparisons #599

Merged
merged 18 commits into from
Mar 31, 2020

Conversation

ggweinand
Copy link
Contributor

Description

Resolves #49.

  • stl/inc/array: The functions where constexpr needed to be added just called other functions which are now constexpr, so only _CONSTEXPR20 was added.

  • stl/inc/yvals_core.h: Modified the definition of the feature test macro __cpp_lib_array_constexpr for cxx20 mode.

  • tests/std/tests/VSO_0157762_feature_test_macros/test.cpp: Added test coverage for __cpp_lib_array_constexpr in cxx20 mode.

Checklist

Be sure you've read README.md and understand the scope of this repo.

If you're unsure about a box, leave it unchecked. A maintainer will help you.

  • Identifiers in product code changes are properly _Ugly as per
    https://eel.is/c++draft/lex.name#3.1 or there are no product code changes.
  • The STL builds successfully and all tests have passed (must be manually
    verified by an STL maintainer before automated testing is enabled on GitHub,
    leave this unchecked for initial submission).
  • These changes introduce no known ABI breaks (adding members, renaming
    members, adding virtual functions, changing whether a type is an aggregate
    or trivially copyable, etc.).
  • These changes were written from scratch using only this repository,
    the C++ Working Draft (including any cited standards), other WG21 papers
    (excluding reference implementations outside of proposed standard wording),
    and LWG issues as reference material. If they were derived from a project
    that's already listed in NOTICE.txt, that's fine, but please mention it.
    If they were derived from any other project (including Boost and libc++,
    which are not yet listed in NOTICE.txt), you must mention it here,
    so we can determine whether the license is compatible and what else needs
    to be done.

@ggweinand ggweinand requested a review from a team as a code owner March 11, 2020 00:07
stl/inc/array Outdated Show resolved Hide resolved
stl/inc/array Outdated Show resolved Hide resolved
stl/inc/yvals_core.h Outdated Show resolved Hide resolved
stl/inc/array Outdated Show resolved Hide resolved
stl/inc/yvals_core.h Outdated Show resolved Hide resolved
tests/std/tests/VSO_0157762_feature_test_macros/test.cpp Outdated Show resolved Hide resolved
tests/std/tests/VSO_0157762_feature_test_macros/test.cpp Outdated Show resolved Hide resolved
stl/inc/array Show resolved Hide resolved
stl/inc/array Show resolved Hide resolved
stl/inc/array Show resolved Hide resolved
@StephanTLavavej StephanTLavavej added the cxx20 C++20 feature label Mar 11, 2020
@CaseyCarter CaseyCarter mentioned this pull request Mar 11, 2020
4 tasks
@ggweinand ggweinand force-pushed the constexprForArrayComparisons branch 2 times, most recently from 9f112b4 to 80b5623 Compare March 19, 2020 02:17
@BillyONeal
Copy link
Member

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@ggweinand ggweinand force-pushed the constexprForArrayComparisons branch from e1c2a15 to 09b6b49 Compare March 27, 2020 02:20
Copy link
Member

@StephanTLavavej StephanTLavavej left a comment

Choose a reason for hiding this comment

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

Looks good! Minor suggestions.

@ggweinand ggweinand force-pushed the constexprForArrayComparisons branch from 17eb416 to c187f72 Compare March 30, 2020 22:17
@ggweinand ggweinand merged commit 90bc621 into microsoft:master Mar 31, 2020
@StephanTLavavej
Copy link
Member

Congratulations on checking in your first C++20 feature, @Weheineman! 😸

@miscco
Copy link
Contributor

miscco commented Apr 1, 2020

Congratulations 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cxx20 C++20 feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

P1023R0 constexpr For std::array Comparisons
5 participants