I want to use the std::string(size_type count,CharT ch) with a big value for count. Reading https://en.cppreference.com/w/cpp/string/basic_string/basic_string, I could not find an exception definition for this constructor, in case it fails.
If it is correct, although there is not a noexcept clause in the constructor, how can I be sure that the string was created? Should I check if its size is not 0?
basic_stringtemplate uses the allocator to allocate memory, and by default it's thestd::allocatortemplate, whoseallocatemember function can throwstd::bad_allocon failure.