std::flat_multiset::size(3)
Hey bestie π this is the std::flat_multiset::size(3) page from the C++ Standard Libary manual. Itβs short, itβs cute, itβs giving βone method, no dramaβ energy β¨
π NAME π
std::flat_multiset::size β literally std::flat_multiset::size, thatβs the name, thatβs the vibe, we move π
πΈ Synopsis πΈ
size_type size() const noexcept;
(since C++23) β¨
Returns the number of elements in the container adaptor. Equivalent to return c.size();.
π Parameters π
(none) β not a single parameter, she takes no arguments π
π¦ Return value π¦
The number of elements in the container adaptor. Periodt π
β Complexity β
Constant. No scrolling, no stress, just constant vibes π₯
π Example π
The following code uses size to display the number of elements in a std::flat_multiset<int>:
// Run this code
#include <iostream>
#include <flat_set>
int main()
{
std::flat_multiset<int> nums{1, 3, 5, 7};
std::cout << "nums contains " << nums.size() << " elements.\n";
}
Output:
nums contains 4 elements.
π See also π
emptyβ checks whether the container adaptor is empty (public member function)sizeβ listed as justsizein the original, with no description attached π«Άssizeβ returns the size of a container or array(C++17)(function template)(C++20)max_sizeβ returns the maximum possible number of elements (public member function)
Thatβs the whole page, bestie π source/version/date: http://cppreference.com, 2024.06.10, std::flat_multiset::size(3). Byeee π
π¦ 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