Files
2025-10-25 03:02:53 +03:00

3.4 KiB
Raw Permalink Blame History

[flat.map.access]

23 Containers library [containers]

23.6 Container adaptors [container.adaptors]

23.6.8 Class template flat_map [flat.map]

23.6.8.6 Access [flat.map.access]

🔗

constexpr mapped_type& operator[](const key_type& x);

1

#

Effects: Equivalent to: return try_emplace(x).first->second;

🔗

constexpr mapped_type& operator[](key_type&& x);

2

#

Effects: Equivalent to: return try_emplace(std::move(x)).first->second;

🔗

template<class K> constexpr mapped_type& operator[](K&& x);

3

#

Constraints: The qualified-id Compare::is_transparent is valid and denotes a type.

4

#

Effects: Equivalent to: return try_emplace(std::forward(x)).first->second;

🔗

constexpr mapped_type& at(const key_type& x); constexpr const mapped_type& at(const key_type& x) const;

5

#

Returns: A reference to the mapped_type corresponding to x in *this.

6

#

Throws: An exception object of type out_of_range if no such element is present.

7

#

Complexity: Logarithmic.

🔗

template<class K> constexpr mapped_type& at(const K& x); template<class K> constexpr const mapped_type& at(const K& x) const;

8

#

Constraints: The qualified-id Compare::is_transparent is valid and denotes a type.

9

#

Preconditions: The expression find(x) is well-formed and has well-defined behavior.

10

#

Returns: A reference to the mapped_type corresponding tox in *this.

11

#

Throws: An exception object of type out_of_range if no such element is present.

12

#

Complexity: Logarithmic.