std::money_base(3cxx)

πŸ’Έ std::money_base β€” money format ordering data πŸ’Έ

manual page tag: std::money_base(3cxx) β€” yes bestie, we’re in the <locale>-adjacent money-formatting corner of libstdc++ πŸ’…


🏷️ NAME 🏷️

std::money_base β€” Money format ordering data.

✨ SYNOPSIS ✨

Include this, periodt:

#include <locale>

Inherited by std::moneypunct< _CharT, _Intl >.

πŸŽ€ Public Types πŸŽ€

  • enum { _S_minus, _S_zero, _S_end }
  • enum part { none, space, symbol, sign, value }

πŸ¦‹ Static Public Member Functions πŸ¦‹

static pattern _S_construct_pattern (char __precedes, char __space, char __posn) throw ()

That signature is the whole vibe, no cap.

🌸 Static Public Attributes 🌸

  • static const char * _S_atoms
  • static const pattern _S_default_pattern

πŸ‘‘ Detailed Description πŸ‘‘

Okay so picture this: the class carries an ordered array of 4 fields, and those fields represent the pattern for formatting a money amount. Each field may contain one entry from the part enum.

Out of those fields, symbol, sign, and value must be present β€” mandatory main characters β€” and the remaining field must contain either none or space. That’s the rule, bestie 🫢

πŸ‘€ See also πŸ‘€

moneypunct::pos_format() and moneypunct::neg_format() β€” those are where the details of how these fields are interpreted live. iykyk.

🧚 Author 🧚

Author: Generated automatically by Doxygen for libstdc++ from the source code.

The docs literally generated themselves β€” iconic automated behavior 😭✨


okay bye bestie β€” this page comes from libstdc++ and the manual tag is std::money_base(3cxx); there’s no date printed on the original, so I’m not inventing one, periodt πŸ’œπŸŽ€

πŸ“¦ where this page comes from