Skip to content

Commit 7f008b5

Browse files
eisenwavetkoeppe
authored andcommitted
P3774R1 Rename std::nontype, and make it broadly useful
1 parent c996222 commit 7f008b5

File tree

2 files changed

+18
-18
lines changed

2 files changed

+18
-18
lines changed

source/support.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -709,7 +709,7 @@
709709
#define @\defnlibxname{cpp_lib_freestanding_utility}@ 202306L // freestanding, also in \libheader{utility}
710710
#define @\defnlibxname{cpp_lib_freestanding_variant}@ 202311L // freestanding, also in \libheader{variant}
711711
#define @\defnlibxname{cpp_lib_fstream_native_handle}@ 202306L // also in \libheader{fstream}
712-
#define @\defnlibxname{cpp_lib_function_ref}@ 202306L // freestanding, also in \libheader{functional}
712+
#define @\defnlibxname{cpp_lib_function_ref}@ 202511L // freestanding, also in \libheader{functional}
713713
#define @\defnlibxname{cpp_lib_gcd_lcm}@ 201606L // freestanding, also in \libheader{numeric}
714714
#define @\defnlibxname{cpp_lib_generator}@ 202207L // also in \libheader{generator}
715715
#define @\defnlibxname{cpp_lib_generic_associative_lookup}@ 201304L // also in \libheader{map}, \libheader{set}

source/utilities.tex

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -213,14 +213,14 @@
213213
};
214214
template<size_t I> constexpr in_place_index_t<I> in_place_index{};
215215

216-
// \tcode{nontype} argument tag%
217-
\indexlibraryglobal{nontype_t}%
218-
\indexlibraryglobal{nontype}
216+
// \tcode{constant_arg} argument tag%
217+
\indexlibraryglobal{constant_arg_t}%
218+
\indexlibraryglobal{constant_arg}
219219
template<auto V>
220-
struct nontype_t {
221-
explicit nontype_t() = default;
220+
struct constant_arg_t {
221+
explicit constant_arg_t() = default;
222222
};
223-
template<auto V> constexpr nontype_t<V> nontype{};
223+
template<auto V> constexpr constant_arg_t<V> constant_arg{};
224224

225225
// \ref{variant.monostate}, class \tcode{monostate}%
226226
\indexlibraryglobal{monostate}
@@ -15077,9 +15077,9 @@
1507715077
// \ref{func.wrap.ref.ctor}, constructors and assignment operators
1507815078
template<class F> function_ref(F*) noexcept;
1507915079
template<class F> constexpr function_ref(F&&) noexcept;
15080-
template<auto f> constexpr function_ref(nontype_t<f>) noexcept;
15081-
template<auto f, class U> constexpr function_ref(nontype_t<f>, U&&) noexcept;
15082-
template<auto f, class T> constexpr function_ref(nontype_t<f>, @\cv{}@ T*) noexcept;
15080+
template<auto f> constexpr function_ref(constant_arg_t<f>) noexcept;
15081+
template<auto f, class U> constexpr function_ref(constant_arg_t<f>, U&&) noexcept;
15082+
template<auto f, class T> constexpr function_ref(constant_arg_t<f>, @\cv{}@ T*) noexcept;
1508315083

1508415084
constexpr function_ref(const function_ref&) noexcept = default;
1508515085
constexpr function_ref& operator=(const function_ref&) noexcept = default;
@@ -15100,9 +15100,9 @@
1510015100
template<class F>
1510115101
function_ref(F*) -> function_ref<F>;
1510215102
template<auto f>
15103-
function_ref(nontype_t<f>) -> function_ref<@\seebelow@>;
15103+
function_ref(constant_arg_t<f>) -> function_ref<@\seebelow@>;
1510415104
template<auto f, class T>
15105-
function_ref(nontype_t<f>, T&&) -> function_ref<@\seebelow@>;
15105+
function_ref(constant_arg_t<f>, T&&) -> function_ref<@\seebelow@>;
1510615106
}
1510715107
\end{codeblock}
1510815108

@@ -15210,7 +15210,7 @@
1521015210

1521115211
\indexlibraryctor{function_ref}%
1521215212
\begin{itemdecl}
15213-
template<auto f> constexpr function_ref(nontype_t<f>) noexcept;
15213+
template<auto f> constexpr function_ref(constant_arg_t<f>) noexcept;
1521415214
\end{itemdecl}
1521515215

1521615216
\begin{itemdescr}
@@ -15241,7 +15241,7 @@
1524115241
\indexlibraryctor{function_ref}%
1524215242
\begin{itemdecl}
1524315243
template<auto f, class U>
15244-
constexpr function_ref(nontype_t<f>, U&& obj) noexcept;
15244+
constexpr function_ref(constant_arg_t<f>, U&& obj) noexcept;
1524515245
\end{itemdecl}
1524615246

1524715247
\begin{itemdescr}
@@ -15275,7 +15275,7 @@
1527515275
\indexlibraryctor{function_ref}%
1527615276
\begin{itemdecl}
1527715277
template<auto f, class T>
15278-
constexpr function_ref(nontype_t<f>, @\cv{}@ T* obj) noexcept;
15278+
constexpr function_ref(constant_arg_t<f>, @\cv{}@ T* obj) noexcept;
1527915279
\end{itemdecl}
1528015280

1528115281
\begin{itemdescr}
@@ -15318,7 +15318,7 @@
1531815318
\begin{itemize}
1531915319
\item \tcode{T} is not the same type as \tcode{function_ref},
1532015320
\item \tcode{is_pointer_v<T>} is \tcode{false}, and
15321-
\item \tcode{T} is not a specialization of \tcode{nontype_t}.
15321+
\item \tcode{T} is not a specialization of \tcode{constant_arg_t}.
1532215322
\end{itemize}
1532315323
\end{itemdescr}
1532415324

@@ -15351,7 +15351,7 @@
1535115351

1535215352
\begin{itemdecl}
1535315353
template<auto f>
15354-
function_ref(nontype_t<f>) -> function_ref<@\seebelow@>;
15354+
function_ref(constant_arg_t<f>) -> function_ref<@\seebelow@>;
1535515355
\end{itemdecl}
1535615356

1535715357
\begin{itemdescr}
@@ -15369,7 +15369,7 @@
1536915369

1537015370
\begin{itemdecl}
1537115371
template<auto f, class T>
15372-
function_ref(nontype_t<f>, T&&) -> function_ref<@\seebelow@>;
15372+
function_ref(constant_arg_t<f>, T&&) -> function_ref<@\seebelow@>;
1537315373
\end{itemdecl}
1537415374

1537515375
\begin{itemdescr}

0 commit comments

Comments
 (0)