Boost logo

Boost :

From: Gennaro Prota (gennaro_prota_at_[hidden])
Date: 2004-03-28 12:11:16

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


Boost list run by bdawes at, gregod at, cpdaniel at, john at