Ignore:
Timestamp:
Oct 6, 2007, 1:02:08 AM (14 years ago)
Author:
Peter
Message:

reimplementing yat_assert as a throwing function

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/yat/utility/Iterator.h

    r932 r936  
    2929#include <iterator>
    3030#include <stddef.h>
     31#include <stdexcept>
    3132
    3233namespace theplu {
     
    6566     */
    6667    return_type operator*(void) const
    67     { yat_assert(index_<container_->size());
     68    { yat_assert<std::out_of_range>(index_<container_->size());
    6869      return container_->operator()(index_); }
    6970
     
    7273     */
    7374    return_type operator[](difference_type n) const
    74     { yat_assert(index_+n < container_->size());
     75    { yat_assert<std::out_of_range>(index_+n < container_->size());
    7576      return container_->operator()(index_+n); }
    7677
Note: See TracChangeset for help on using the changeset viewer.