|
Subject: [timer] throwing constructor? Newsgroups: gmane.comp.lib.boost.devel Date: 2004-03-28 17:11:16 GMT (4 years, 28 weeks, 1 day, 18 hours and 49 minutes ago)
The documentation for boost::timer says:
"The constructors may throw std::bad_alloc."
I don't see how they could. There are two of them; one is the compiler
generated copy constructor and the other one is:
timer() { _start_time = std::clock(); }
Maybe the intent was to write it as:
start_time = std::clock();
if (_start_time == (std::clock_t)(-1))
throw ...;
?
But why the exception would be bad_alloc?
PS: I haven't checked whether progress_timer and progress display have
the same problem.
PS2: I know that it is (the intent for it to be) allowed in class
scope but shouldn't we refrain from using identifiers with a leading
underscore?
Genny.
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
|
|
|