File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 684684#define @\defnlibxname {cpp_lib_to_address}@ 201711L // also in \libheader {memory}
685685#define @\defnlibxname {cpp_lib_to_array}@ 201907L // also in \libheader {array}
686686#define @\defnlibxname {cpp_lib_to_chars}@ 201611L // also in \libheader {charconv}
687+ #define @\defnlibxname {cpp_lib_to_underlying}@ 202102L // also in \libheader {utility}
687688#define @\defnlibxname {cpp_lib_transformation_trait_aliases}@ 201304L // also in \libheader {type_traits}
688689#define @\defnlibxname {cpp_lib_transparent_operators}@ 201510L // also in \libheader {memory}, \libheader {functional}
689690#define @\defnlibxname {cpp_lib_tuple_element_t}@ 201402L // also in \libheader {tuple}
Original file line number Diff line number Diff line change 9595 template<class R, class T>
9696 constexpr bool in_range(T t) noexcept;
9797
98+ // \ref{utility.underlying}, \tcode{to_underlying}
99+ template<class T>
100+ constexpr underlying_type_t<T> to_underlying(T value) noexcept;
101+
98102 // \ref{intseq}, compile-time integer sequences%
99103\indexlibraryglobal{index_sequence}%
100104\indexlibraryglobal{make_index_sequence}%
568572\tcode{bool}.
569573\end{note}
570574
575+ \rSec2[utility.underlying]{Function template \tcode{to_underlying}}
576+
577+ \begin{itemdecl}
578+ template<class T>
579+ constexpr underlying_type_t<T> to_underlying(T value) noexcept;
580+ \end{itemdecl}
581+
582+ \begin{itemdescr}
583+ \pnum
584+ \returns
585+ \tcode{static_cast<underlying_type_t<T>>(value)}.
586+ \end{itemdescr}
587+
588+
571589\rSec1[intseq]{Compile-time integer sequences}
572590
573591\rSec2[intseq.general]{In general}
You can’t perform that action at this time.
0 commit comments