std::front_...ert_iterator(3)

πŸ“¦ version 2024.07.05, in nixpkgs unstable, opensuse-leap 16.0

πŸŽ€ NAME πŸŽ€

std::front_insert_iterator::front_insert_iterator β€” that's the whole name, bestie, no cap. This is the std::front_...ert_iterator(3) page from the C++ Standard Libary (yes, the header spells it like that, and we're keeping it πŸ’…). It's all about the constructor for std::front_insert_iterator, and it's lowkey iconic.


✨ Synopsis ✨

explicit front_insert_iterator( Container& c );            (until C++20)
constexpr explicit front_insert_iterator( Container& c );  (since C++20)

Initializes the underlying pointer to the container to std::addressof(c). That's the whole move. ✨

🌸 Parameters 🌸

  • c β€” container to initialize the inserter with.

πŸ¦‹ Defect reports πŸ¦‹

The following behavior-changing defect reports were applied retroactively to previously published C++ standards.

  • DR: P2325R3
    • Applied to: C++20 β€” and yes, the source row also has a second C++20 floating around in it, so here's that too: C++20. Formatting chaos, but the facts stay. πŸ’€
    • Behavior as published: default constructor was provided as requirement iterators must be default_initializable
    • Correct behavior: removed along with the requirement

source: http://cppreference.com Β· date: 2024.06.10 Β· page: std::front_...ert_iterator(3) β€” mwah πŸ’‹ go insert at the front, bestie 🫢

πŸ“¦ where this page comes from