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/IteratorWeighted.h

    r916 r936  
    88#include <iterator>
    99#include <stddef.h>
     10#include <stdexcept>
    1011
    1112namespace theplu {
     
    4546    return_type operator*(void) const
    4647    {
    47       yat_assert(index_<container_->size());
     48      yat_assert<std::out_of_range>(index_<container_->size());
    4849      return container_->operator()(index_);
    4950    }
     
    5354    */
    5455    return_type data(void) const
    55     { yat_assert(index_<container_->size()); return container_->data(index_); }
     56    { yat_assert<std::out_of_range>(index_<container_->size());
     57      return container_->data(index_); }
    5658
    5759    /**
     
    5961    */
    6062    return_type weight(void) const
    61     { yat_assert(index_<container_->size());return container_->weight(index_); }
     63    { yat_assert<std::out_of_range>(index_<container_->size());
     64      return container_->weight(index_); }
    6265
    6366
Note: See TracChangeset for help on using the changeset viewer.