Skip to content

Fix C++17 build of WeakPartialOrderingTest - #32

Open
arthaud wants to merge 1 commit into
facebook:mainfrom
arthaud:fix-cxx17-weak-partial-ordering-test
Open

Fix C++17 build of WeakPartialOrderingTest#32
arthaud wants to merge 1 commit into
facebook:mainfrom
arthaud:fix-cxx17-weak-partial-ordering-test

Conversation

@arthaud

@arthaud arthaud commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

std::to_array is only available from C++20 onwards, but the project pins C++17 (CMAKE_CXX_STANDARD in cmake_modules/Commons.cmake), so the test failed to compile:

error: 'to_array' is not a member of 'std'

None of the library headers use any C++20 feature, so make the test match the standard the rest of the project targets rather than raising it. lst is only ever read through lst[i++], so a std::vector initializer is a drop-in replacement at all 15 call sites.

Drop the now-unused include and add , which the file already relied on transitively.

`std::to_array` is only available from C++20 onwards, but the project
pins C++17 (CMAKE_CXX_STANDARD in cmake_modules/Commons.cmake), so the
test failed to compile:

    error: 'to_array' is not a member of 'std'

None of the library headers use any C++20 feature, so make the test
match the standard the rest of the project targets rather than raising
it. `lst` is only ever read through `lst[i++]`, so a `std::vector`
initializer is a drop-in replacement at all 15 call sites.

Drop the now-unused <array> include and add <vector>, which the file
already relied on transitively.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DA9pVcgt8MxaeGJUaYfh5H
@meta-cla meta-cla Bot added the CLA Signed Do not delete this pull request or issue due to inactivity. label Sep 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed Do not delete this pull request or issue due to inactivity.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant