Namespaces
Variants

Talk:cpp/string/basic string/at

From cppreference.com

Doubtful notion for exception safety

at is already non-modifying, so even if LWG847 were not adopted, how can it have effects on the basic_string when it throws an exception? --Fruderica (talk) 05:27, 10 January 2024 (PST)

And the same can be said about the following non-modifying members:
  • std::string::compare
  • std::string::find
  • std::string::rfind
  • std::string::find_first_of
  • std::string::find_first_not_of
  • std::string::find_last_of
  • std::string::find_last_not_of.
+ Constructor too std::string::string.
--Space Mission (talk) 15:07, 12 January 2024 (PST)