exception safety of boost graph library
Hello everybody, We are going to use boost graph library within our application and I would like to know if there are any known issues regarding the exception safety. Is the basic guarantee satisfied? Is the strong guarantee satisfied? (see Herb Sutter's definition of basic/strong guarantee in Exceptional C++) "Basic guarantee: Even in the presence of exceptions thrown by T or other exceptions, Stack objects don't leak resources. Note that this also implies that the container will be destructible and usable even if an exception is thrown while performing some container operation. However, if an exception is thrown, the container will be in a consistent, but not necessarily predictable, state. Containers that support the basic guarantee can work safely in some settings. Strong guarantee: If an operation terminates because of an exception, program state will remain unchanged. This always implies commit-or-rollback semantics, including that no references or iterators into the container be invalidated if an operation fails. For example, if a Stack client calls Top and then attempts a Push that fails because of an exception, then the state of the Stack object must be unchanged and the reference returned from the prior call to Top must still be valid." (Herb Sutter, Exceptional C++) Thank you, vidu
On Tuesday 18 January 2005 03:27 am, Ovidiu Deac wrote:
We are going to use boost graph library within our application and I would like to know if there are any known issues regarding the exception safety. Is the basic guarantee satisfied? Is the strong guarantee satisfied? (see Herb Sutter's definition of basic/strong guarantee in Exceptional C++)
The basic guarantee is satisfied by the BGL. The strong guarantee will only be satisfied in a few places (e.g., adding/removing edges or vertices from an adjacency_list), but is not satisfied by the library as a whole. Doug
participants (2)
-
Douglas Gregor
-
Ovidiu Deac