From f02a605831f984a566ab9f3ada8273be6854992a Mon Sep 17 00:00:00 2001 From: Eisenwave Date: Sun, 9 Nov 2025 10:02:48 +0100 Subject: [PATCH 1/3] P3774R1 Rename std::nontype, and make it broadly useful --- source/utilities.tex | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/source/utilities.tex b/source/utilities.tex index f704f0dae7..1747585e0d 100644 --- a/source/utilities.tex +++ b/source/utilities.tex @@ -214,13 +214,13 @@ template constexpr in_place_index_t in_place_index{}; // \tcode{nontype} argument tag% -\indexlibraryglobal{nontype_t}% -\indexlibraryglobal{nontype} +\indexlibraryglobal{constant_arg_t}% +\indexlibraryglobal{constant_arg} template - struct nontype_t { - explicit nontype_t() = default; + struct constant_arg_t { + explicit constant_arg_t() = default; }; - template constexpr nontype_t nontype{}; + template constexpr constant_arg_t constant_arg{}; // \ref{variant.monostate}, class \tcode{monostate}% \indexlibraryglobal{monostate} @@ -14952,9 +14952,9 @@ // \ref{func.wrap.ref.ctor}, constructors and assignment operators template function_ref(F*) noexcept; template constexpr function_ref(F&&) noexcept; - template constexpr function_ref(nontype_t) noexcept; - template constexpr function_ref(nontype_t, U&&) noexcept; - template constexpr function_ref(nontype_t, @\cv{}@ T*) noexcept; + template constexpr function_ref(constant_arg_t) noexcept; + template constexpr function_ref(constant_arg_t, U&&) noexcept; + template constexpr function_ref(constant_arg_t, @\cv{}@ T*) noexcept; constexpr function_ref(const function_ref&) noexcept = default; constexpr function_ref& operator=(const function_ref&) noexcept = default; @@ -14975,9 +14975,9 @@ template function_ref(F*) -> function_ref; template - function_ref(nontype_t) -> function_ref<@\seebelow@>; + function_ref(constant_arg_t) -> function_ref<@\seebelow@>; template - function_ref(nontype_t, T&&) -> function_ref<@\seebelow@>; + function_ref(constant_arg_t, T&&) -> function_ref<@\seebelow@>; } \end{codeblock} @@ -15085,7 +15085,7 @@ \indexlibraryctor{function_ref}% \begin{itemdecl} -template constexpr function_ref(nontype_t) noexcept; +template constexpr function_ref(constant_arg_t) noexcept; \end{itemdecl} \begin{itemdescr} @@ -15116,7 +15116,7 @@ \indexlibraryctor{function_ref}% \begin{itemdecl} template - constexpr function_ref(nontype_t, U&& obj) noexcept; + constexpr function_ref(constant_arg_t, U&& obj) noexcept; \end{itemdecl} \begin{itemdescr} @@ -15150,7 +15150,7 @@ \indexlibraryctor{function_ref}% \begin{itemdecl} template - constexpr function_ref(nontype_t, @\cv{}@ T* obj) noexcept; + constexpr function_ref(constant_arg_t, @\cv{}@ T* obj) noexcept; \end{itemdecl} \begin{itemdescr} @@ -15193,7 +15193,7 @@ \begin{itemize} \item \tcode{T} is not the same type as \tcode{function_ref}, \item \tcode{is_pointer_v} is \tcode{false}, and -\item \tcode{T} is not a specialization of \tcode{nontype_t}. +\item \tcode{T} is not a specialization of \tcode{constant_arg_t}. \end{itemize} \end{itemdescr} @@ -15226,7 +15226,7 @@ \begin{itemdecl} template - function_ref(nontype_t) -> function_ref<@\seebelow@>; + function_ref(constant_arg_t) -> function_ref<@\seebelow@>; \end{itemdecl} \begin{itemdescr} @@ -15244,7 +15244,7 @@ \begin{itemdecl} template - function_ref(nontype_t, T&&) -> function_ref<@\seebelow@>; + function_ref(constant_arg_t, T&&) -> function_ref<@\seebelow@>; \end{itemdecl} \begin{itemdescr} From e348b9f0e3d11d336e1d26a74dc709ba5b1e003d Mon Sep 17 00:00:00 2001 From: Eisenwave Date: Sun, 9 Nov 2025 10:03:26 +0100 Subject: [PATCH 2/3] Fixup wrong name in synopsis comment --- source/utilities.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/utilities.tex b/source/utilities.tex index 1747585e0d..b3cf4751ac 100644 --- a/source/utilities.tex +++ b/source/utilities.tex @@ -213,7 +213,7 @@ }; template constexpr in_place_index_t in_place_index{}; - // \tcode{nontype} argument tag% + // \tcode{constant_arg} argument tag% \indexlibraryglobal{constant_arg_t}% \indexlibraryglobal{constant_arg} template From f8bf5ad3ad0b7a9ae491b3bb280c0f19d8568611 Mon Sep 17 00:00:00 2001 From: Eisenwave Date: Sat, 15 Nov 2025 19:12:46 +0100 Subject: [PATCH 3/3] Fixup: bump feature-test macro --- source/support.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/support.tex b/source/support.tex index b6f6be77af..ad4e1e98fe 100644 --- a/source/support.tex +++ b/source/support.tex @@ -708,7 +708,7 @@ #define @\defnlibxname{cpp_lib_freestanding_utility}@ 202306L // freestanding, also in \libheader{utility} #define @\defnlibxname{cpp_lib_freestanding_variant}@ 202311L // freestanding, also in \libheader{variant} #define @\defnlibxname{cpp_lib_fstream_native_handle}@ 202306L // also in \libheader{fstream} -#define @\defnlibxname{cpp_lib_function_ref}@ 202306L // also in \libheader{functional} +#define @\defnlibxname{cpp_lib_function_ref}@ 202511L // also in \libheader{functional} #define @\defnlibxname{cpp_lib_gcd_lcm}@ 201606L // also in \libheader{numeric} #define @\defnlibxname{cpp_lib_generator}@ 202207L // also in \libheader{generator} #define @\defnlibxname{cpp_lib_generic_associative_lookup}@ 201304L // also in \libheader{map}, \libheader{set}