On Feb 5, 4:22 am, ManicQin <Manic...@[EMAIL PROTECTED]
> wrote:
>
> I'm sorry there's something I'm missing that I will love to catch up.
> Since when STL and Boost are "coupled" with exception handling?
> Are there any libraries that are specific for "un-safe" programming?
>
Both STL and Boost for the most part don't need exceptions. They can
work pretty well without them. But the containers and algorithms of
STL (and some boost libraries) use default constructors, copy
constructors and copy assignment operators on their elements (objects
of your class) quite freely. They are not going to check if these
operations succeeded using the custom error checking you have
designed. They simply assume that return from these operations means
they are successful, which is not true in most real world cases. In
other words, they expect the user types to throw an exception if any
of these common operations fail.
> I accept with Richard that they are "exception neutral" why is it so
> im****tant?
>
It is im****tant in cases where you have types that never fail in
default construction, copy construction and copy assignment operation.
For example, if you dealing with a primitive type such as int, STL is
exception free.
--
[ See http://www.gotw.ca/resources/clcm.htm
for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]