* @brief Appends the given character at the end. * @throw `std::length_error` if the string is too long. * @throw `std::bad_alloc` if the allocation fails. */
| 3889 | * @throw `std::bad_alloc` if the allocation fails. |
| 3890 | */ |
| 3891 | void push_back(char_type ch) noexcept(false) { |
| 3892 | if (size() == max_size()) throw std::length_error("string::push_back"); |
| 3893 | if (!try_push_back(ch)) throw std::bad_alloc(); |
| 3894 | } |
| 3895 | |
| 3896 | /** |
| 3897 | * @brief Removes the last character from the string. |
no outgoing calls