A C++ template library for embedded applications
Designed and maintained by
Aster Consulting Ltd


A utility class designed for debugging purposes. This is used in the ETL containers to check that all
placement new'd items have been destructed. When neither DEBUG or _DEBUG is defined then this class
does nothing and will be optimised away.

If the count is decremented below zero then an assert will be generated.
If the destructor for this class is called and the count is not zero then an assert will be generated.

Supports operators ++, --, +=, -=

class MyContainer

  void push(value_type value)
    value_type* p = pool.allocate<value_type>();
    new (p) value_type(value);
    // Store in the buffer.  

  void pop()
    // Get the pointer to the item to pop.

  etl::debug_count instance_count;