STD::TIME_PUT_BYNAME(3)
π std::time_put_byname< _CharT, _OutIter > π
okay bestie, gather round, because today we're meeting std::time_put_byname< _CharT, _OutIter > β aka class time_put_byname [22.2.5.4]. it lives in the libstdc++ manual (section 3, library functions, you know the vibe β¨) and it is genuinely so good at what it does. let's get into it π«Ά
πΈ NAME πΈ
std::time_put_byname< _CharT, _OutIter > β that's the class time_put_byname, [22.2.5.4]. periodt. π
β¨ SYNOPSIS β¨
first thing, the include, no notes:
#include <locale>
and it Inherits std::time_put< _CharT, _OutIter > β so all that parent energy is coming with it, fr fr.
π Public Types π
typedef _CharT char_typetypedef _OutIter iter_type
π Public Member Functions π
time_put_byname (const char *, size_t __refs=0)time_put_byname (const string &__s, size_t __refs=0)iter_type put (iter_type __s, ios_base &__io, char_type __fill, const tm *__tm, char __format, char __mod=0) constβ format and output a time or date π°οΈiter_type put (iter_type __s, ios_base &__io, char_type __fill, const tm *__tm, const _CharT *__beg, const _CharT *__end) constβ format and output a time or date π°οΈ (yes, again, but with a format string this time, not a single char)
β Static Public Attributes β
static locale::id idβ the Numpunct facet id.
π¦ Protected Member Functions π¦
virtual iter_type do_put (iter_type __s, ios_base &__io, char_type __fill, const tm *__tm, char __format, char __mod) constβ format and output a time or date π°οΈ
π Static Protected Member Functions π
static __c_locale _S_clone_c_locale (__c_locale &__cloc)throw ()static void _S_create_c_locale (__c_locale &__cloc, const char *__s, __c_locale __old=0)static void _S_destroy_c_locale (__c_locale &__cloc)static __c_locale _S_get_c_locale ()static const char * _S_get_c_name ()throw ()static __c_locale _S_lc_ctype_c_locale (__c_locale __cloc, const char *__s)
π Detailed Description π
template<typename _CharT, typename _OutIter>
class std::time_put_byname< _CharT, _OutIter >
and the description of it is literally, verbatim, the name again: class time_put_byname [22.2.5.4]. iconic of it honestly, it knows its own name and it's not gonna elaborate. π
π₯ Member Function Documentation π₯
π«Ά do_put π«Ά
template<typename _CharT, typename _OutIter>
_OutIter std::time_put< _CharT, _OutIter >::do_put
(iter_type __s, ios_base & __io, char_type __fill, const tm * __tm,
char __format, char __mod) const
tags on this one: [protected], [virtual], [inherited] β so it's a protected virtual hook that we got from the parent. slay.
Format and output a time or date. this function formats the data in struct tm according to the provided format char and optional modifier. and listen β this function is a hook for derived classes to change the value returned. so it's literally the "hey subclasses, do your thing" door πͺβ¨
See also: put() for more details.
Parameters:
__sβ the stream to write to.__ioβ source of locale.__fillβchar_typeto use for padding.__tmβStruct tmwith date and time info to format.__formatβ format char.__modβ optional modifier char.
Returns: iterator after writing.
References std::ios_base::_M_getloc(), std::use_facet(), and std::__ctype_abstract_base< _CharT >::widen().
Referenced by put(), and put(). (both of them, bestie, it's popular π
)
π put (the format-char one) π
template<typename _CharT, typename _OutIter>
iter_type std::time_put< _CharT, _OutIter >::put
(iter_type __s, ios_base & __io, char_type __fill, const tm * __tm,
char __format, char __mod = 0) const
tags: [inline], [inherited].
Format and output a time or date. formats the data in struct tm according to the provided format char and optional modifier. the format and modifier are interpreted as by strftime(). and it does so by returning time_put::do_put() β so it's basically the friendly front desk that sends you to do_put in the back office π«‘
Parameters:
__sβ the stream to write to.__ioβ source of locale.__fillβchar_typeto use for padding.__tmβStruct tmwith date and time info to format.__formatβ format char.__modβ optional modifier char.
Returns: iterator after writing.
References do_put().
π§ put (the format-string one) π§
template<typename _CharT, typename _OutIter>
_OutIter std::time_put< _CharT, _OutIter >::put
(iter_type __s, ios_base & __io, char_type __fill, const tm * __tm,
const _CharT * __beg, const _CharT * __end) const
tags: [inherited].
Format and output a time or date. this one formats the data in struct tm according to the provided format string (not just one char, we're fancy now). the format string is interpreted as by strftime().
Parameters:
__sβ the stream to write to.__ioβ source of locale.__fillβchar_typeto use for padding.__tmβStruct tmwith date and time info to format.__begβ start of format string.__endβ end of format string.
Returns: iterator after writing.
References std::ios_base::_M_getloc(), do_put(), std::__ctype_abstract_base< _CharT >::narrow(), and std::use_facet().
π Member Data Documentation π
template<typename _CharT, typename _OutIter>
locale::id std::time_put< _CharT, _OutIter >::id
tags: [static], [inherited].
it's the Numpunct facet id. that's the whole description. short and mysterious, main character energy honestly π
π Author π
Generated automatically by Doxygen for libstdc++ from the source code.
no cap, every option, overload, parameter and reference above is straight from the page β nothing dropped, nothing invented, just delivered with the correct amount of sparkle. π
and that's the whole thing bestie!! this page is from the libstdc++ manual, it's the std::time_..._OutIter >(3) page (Library Functions Manual, section 3, the one and only), and it was written in the year of our lord whenever libstdc++ felt like it πβ¨ mwah, go format some timestamps, you ate π
π¦πΈ
π¦ where this page comes from
- arch rolling: gcc 16.2.1+r23+gd564253eb6c8-1 Β· GPL-3.0-or-later WITH GCC-exception-3.1 AND GFDL-1.3-or-later
- centos-stream 10: gcc-toolset-15-libstdc++-docs 15.2.1-8.1.el10 Β· GPL-3.0-or-later AND LGPL-3.0-or-later AND (GPL-3.0-or-later WITH GCC-exception-3.1) AND (GPL-3.0-or-later WITH Texinfo-exception) AND (LGPL-2.1-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GNU-compiler-exception) AND BSL-1.0 AND GFDL-1.3-or-later AND Linux-man-pages-copyleft-2-para AND SunPro AND BSD-1-Clause AND BSD-2-Clause AND BSD-2-Clause-Views AND BSD-3-Clause AND BSD-4-Clause AND BSD-Source-Code AND Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 WITH LLVM-Exception) AND ZPL-2.1 AND ISC AND LicenseRef-Fedora-Public-Domain AND HP-1986 AND curl AND Martin-Birgmeier AND HPND-Markus-Kuhn AND dtoa AND SMLNJ AND AMD-newlib AND OAR AND HPND-merchantability-variant AND HPND-Intel
- centos-stream 10: gcc-toolset-16-libstdc++-docs 16.2.1-1.3.el10 Β· GPL-3.0-or-later AND LGPL-3.0-or-later AND (GPL-3.0-or-later WITH GCC-exception-3.1) AND (GPL-3.0-or-later WITH Texinfo-exception) AND (LGPL-2.1-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GNU-compiler-exception) AND BSL-1.0 AND GFDL-1.3-or-later AND Linux-man-pages-copyleft-2-para AND SunPro AND BSD-1-Clause AND BSD-2-Clause AND BSD-2-Clause-Views AND BSD-3-Clause AND BSD-4-Clause AND BSD-Source-Code AND Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 WITH LLVM-Exception) AND ZPL-2.1 AND ISC AND LicenseRef-Fedora-Public-Domain AND HP-1986 AND curl AND Martin-Birgmeier AND HPND-Markus-Kuhn AND dtoa AND SMLNJ AND AMD-newlib AND OAR AND HPND-merchantability-variant AND HPND-Intel
- centos-stream 10: libstdc++-docs 14.4.1-4.el10 Β· GPL-3.0-or-later AND LGPL-3.0-or-later AND (GPL-3.0-or-later WITH GCC-exception-3.1) AND (GPL-3.0-or-later WITH Texinfo-exception) AND (LGPL-2.1-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GNU-compiler-exception) AND BSL-1.0 AND GFDL-1.3-or-later AND Linux-man-pages-copyleft-2-para AND SunPro AND BSD-1-Clause AND BSD-2-Clause AND BSD-2-Clause-Views AND BSD-3-Clause AND BSD-4-Clause AND BSD-Source-Code AND Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 WITH LLVM-Exception) AND ZPL-2.1 AND ISC AND LicenseRef-Fedora-Public-Domain AND HP-1986 AND curl AND Martin-Birgmeier AND HPND-Markus-Kuhn AND dtoa AND SMLNJ AND AMD-newlib AND OAR AND HPND-merchantability-variant AND HPND-Intel
- fedora 44: libstdc++-docs 16.0.1-0.10.fc44 Β· GPL-3.0-or-later AND LGPL-3.0-or-later AND (GPL-3.0-or-later WITH GCC-exception-3.1) AND (GPL-3.0-or-later WITH Texinfo-exception) AND (LGPL-2.1-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GNU-compiler-exception) AND BSL-1.0 AND GFDL-1.3-or-later AND Linux-man-pages-copyleft-2-para AND SunPro AND BSD-1-Clause AND BSD-2-Clause AND BSD-2-Clause-Views AND BSD-3-Clause AND BSD-4-Clause AND BSD-Source-Code AND Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 WITH LLVM-Exception) AND ZPL-2.1 AND ISC AND LicenseRef-Fedora-Public-Domain AND HP-1986 AND curl AND Martin-Birgmeier AND HPND-Markus-Kuhn AND dtoa AND SMLNJ AND AMD-newlib AND OAR AND HPND-merchantability-variant AND HPND-Intel
- fedora 44: libstdc++-docs 16.2.1-2.fc44
- fedora 44: libstdc++-docs 16.2.1-3.fc44 Β· GPL-3.0-or-later AND LGPL-3.0-or-later AND (GPL-3.0-or-later WITH GCC-exception-3.1) AND (GPL-3.0-or-later WITH Texinfo-exception) AND (LGPL-2.1-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GNU-compiler-exception) AND BSL-1.0 AND GFDL-1.3-or-later AND Linux-man-pages-copyleft-2-para AND SunPro AND BSD-1-Clause AND BSD-2-Clause AND BSD-2-Clause-Views AND BSD-3-Clause AND BSD-4-Clause AND BSD-Source-Code AND Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 WITH LLVM-Exception) AND ZPL-2.1 AND ISC AND LicenseRef-Fedora-Public-Domain AND HP-1986 AND curl AND Martin-Birgmeier AND HPND-Markus-Kuhn AND dtoa AND SMLNJ AND AMD-newlib AND OAR AND HPND-merchantability-variant AND HPND-Intel
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms