Skip to content

constexpr for std::array Comparisons - #599

Merged
Gianni Georg Weinand (ggweinand) merged 18 commits into
microsoft:masterfrom
ggweinand:constexprForArrayComparisons
Mar 31, 2020
Merged

constexpr for std::array Comparisons#599
Gianni Georg Weinand (ggweinand) merged 18 commits into
microsoft:masterfrom
ggweinand:constexprForArrayComparisons

Conversation

@ggweinand

Copy link
Copy Markdown
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.

Comment thread stl/inc/array
Comment thread stl/inc/array
Comment thread stl/inc/yvals_core.h Outdated
Comment thread stl/inc/array
Comment thread stl/inc/yvals_core.h Outdated
Comment thread tests/std/tests/VSO_0157762_feature_test_macros/test.cpp Outdated
Comment thread tests/std/tests/VSO_0157762_feature_test_macros/test.cpp Outdated
Comment thread stl/inc/array
Comment thread stl/inc/array
Comment thread stl/inc/array
@CaseyCarter Casey Carter (CaseyCarter) mentioned this pull request Mar 11, 2020
4 tasks
@ggweinand
Gianni Georg Weinand (ggweinand) force-pushed the constexprForArrayComparisons branch 2 times, most recently from 9f112b4 to 80b5623 Compare March 19, 2020 02:17
Comment thread tests/std/tests/P1023R0_constexpr_for_array_comparisons/test.cpp Outdated
Comment thread tests/std/tests/P1023R0_constexpr_for_array_comparisons/test.cpp Outdated
Comment thread tests/std/tests/P1023R0_constexpr_for_array_comparisons/test.cpp Outdated
Comment thread tests/std/tests/P1023R0_constexpr_for_array_comparisons/test.cpp
Comment thread tests/std/tests/P1023R0_constexpr_for_array_comparisons/test.cpp Outdated
Comment thread tests/std/tests/P1023R0_constexpr_for_array_comparisons/test.cpp Outdated
@BillyONeal

Copy link
Copy Markdown
Member

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good! Minor suggestions.

Comment thread tests/std/tests/P1023R0_constexpr_for_array_comparisons/test.cpp Outdated
Comment thread tests/std/tests/P1023R0_constexpr_for_array_comparisons/test.cpp Outdated
Comment thread tests/std/tests/P1023R0_constexpr_for_array_comparisons/test.cpp Outdated
Comment thread tests/std/tests/P1023R0_constexpr_for_array_comparisons/test.cpp
Comment thread tests/libcxx/skipped_tests.txt
@ggweinand
Gianni Georg Weinand (ggweinand) merged commit 90bc621 into microsoft:master Mar 31, 2020
@StephanTLavavej

Copy link
Copy Markdown
Member

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

@miscco

Copy link
Copy Markdown
Contributor

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