Skip to content

Refactor use of std::nontype to use std::constant_wrapper instead per P3948#196

Merged
ednolan merged 1 commit intomainfrom
enolan_p3948_1
Apr 25, 2026
Merged

Refactor use of std::nontype to use std::constant_wrapper instead per P3948#196
ednolan merged 1 commit intomainfrom
enolan_p3948_1

Conversation

@ednolan
Copy link
Copy Markdown
Member

@ednolan ednolan commented Apr 25, 2026

std::nontype no longer exists in the C++ standard draft, as it was removed by P3948 (and, previously, renamed by P3774), so when GCC implemented __cpp_lib_function_ref, the std::nontype polyfill tried to switch to the standard library's nonexistent std::nontype implementation, causing the build to fail.

This commit replaces the std::nontype polyfill with a std::constant_wrapper polyfill and updates the paper to reflect this change.

@ednolan ednolan requested a review from camio as a code owner April 25, 2026 22:42
… P3948

std::nontype no longer exists in the C++ standard draft, as it was
removed by P3948 (and, previously, renamed by P3774), so when GCC
implemented __cpp_lib_function_ref, the std::nontype polyfill tried to
switch to the standard library's nonexistent std::nontype
implementation, causing the build to fail.

This commit replaces the std::nontype polyfill with a
std::constant_wrapper polyfill and updates the paper to reflect this
change.
@coveralls
Copy link
Copy Markdown

Coverage Status

coverage: 99.738%. remained the same — enolan_p3948_1 into main

@ednolan ednolan merged commit 45531fd into main Apr 25, 2026
39 checks passed
@ednolan ednolan deleted the enolan_p3948_1 branch April 25, 2026 22:46
@@ -0,0 +1,37 @@
// SPDX-License-Identifier: BSL-1.0

// Copyright Eddie Nolan and Jonathan Wakely 2023 - 2025.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This file is new in 2026, and it's all your work, isn't it?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I created #199 to address this

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.

3 participants