mercredi 5 août 2020

Removing noexcept from a C++ function, how to deal with the noexcept functions that call it?

Suppose I have a foo function marked as noexcept somewhere in my code. Many other functions call foo, and many of them are also marked as noexcept.

Now suppose I have to adjust foo, and now it can throw an exception, so it's not noexcept anymore.

  1. All the functions that call foo must have the noexcept removed, is this correct?

  2. How am I suppose to find all those functions that call foo? Is there a better way than ordinary searching with my text editor?

Aucun commentaire:

Enregistrer un commentaire