std::match_...atch_results(3)
π std::match_results::match_results π
okay so bestie, this is the std::match_results::match_results page from the C++ Standard Libary manual (spelling exactly as the header gives it π), and the page tag in the header is std::match_...atch_results(3) β yes, it's literally abbreviated like that π
. We're talking constructors today, and it's giving very self-titled icon behavior π.
πΈ NAME πΈ
std::match_results::match_results β the constructor for std::match_results, literally right there in the name. no cap.
β¨ Synopsis β¨
match_results() : match_results(Allocator()) {} (1)
(since C++11)
explicit match_results( const Allocator& a ); (2)
(since C++11)
match_results( const match_results& rhs ); (3)
(since C++11)
match_results( const match_results& rhs, const Allocator& a ); (4)
(since C++11)
match_results( match_results&& rhs ) noexcept; (5)
(since C++11)
match_results( match_results&& rhs, const Allocator& a ); (6)
(since C++11)
Here's the group chat recap of each one, bestie:
- 1) Default constructor. Constructs a match result with no established result state (
ready() != true). (since C++11) - 2) Constructs a match result with no established result state (
ready() != true) using a copy ofaas the allocator. (since C++11) Also, this one isexplicit, so don't get cute with implicit conversions. - 3) Copy constructor. Constructs a match result with a copy of
rhs. (since C++11) - 4) Constructs a match result with a copy of
rhs, and uses a copy ofaas the allocator. (since C++11) - 5) Move constructor. Constructs a match result with the contents of
rhsusing move semantics.rhsis in valid, but unspecified state after the call. (since C++11) This one isnoexcept, slay. - 6) Constructs a match result with the contents of
rhsusing move semantics, and uses a copy ofaas the allocator.rhsis in valid, but unspecified state after the call. (since C++11)
π Parameters π
aβ allocator to use for all memory allocations of this container.rhsβ anothermatch_resultsto use as source to initialize thematch_resultswith.
π₯ Exceptions π₯
- 1β4) May throw implementation-defined exceptions.
- 6) Throws nothing if
a == rhs.get_allocator()is true.
bestie, notice that only 1β4 and 6 get exception notes here. don't invent extra lore for the others π
π Example π
This section is incomplete.
Reason: no example.
π Defect reports π
The following behavior-changing defect reports were applied retroactively to previously published C++ standards.
LWG 2195β applied to C++11. Behavior as published: the constructors required byAllocatorAwareContainerwere missing. Correct behavior: added.P0935R0β applied to C++11. Behavior as published: default constructor wasexplicit. Correct behavior: made implicit.
π Category π
- Todo no example
xoxo, bestie π«Ά this page is from http://cppreference.com, dated 2024.06.10, and the footer tag reads std::match_...atch_results(3) β periodt. π
π¦ where this page comes from
- nixpkgs unstable: stdman 2024.07.05
- opensuse-leap 16.0: stdman 2024.07.05-bp160.1.9 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms