src/include/invalid.h
changeset 533 04eb0d9022c8
parent 389 770cc1f4861f
equal deleted inserted replaced
1:f5814a1288ca 2:f18b53b49e1d
    10 
    10 
    11   /// Dummy type to make it easier to make invalid iterators.
    11   /// Dummy type to make it easier to make invalid iterators.
    12   
    12   
    13   /// See \ref INVALID, how to use it.
    13   /// See \ref INVALID, how to use it.
    14   
    14   
    15   struct Invalid {};
    15   struct Invalid {
       
    16   public:
       
    17     bool operator==(Invalid) { return true;  }
       
    18     bool operator!=(Invalid) { return false; }
       
    19     bool operator< (Invalid) { return false; }
       
    20   };
    16   
    21   
    17   /// Invalid iterators.
    22   /// Invalid iterators.
    18   
    23   
    19   /// \ref Invalid is a global type that converts to each iterator
    24   /// \ref Invalid is a global type that converts to each iterator
    20   /// in such a way that the value of the target iterator will be invalid.
    25   /// in such a way that the value of the target iterator will be invalid.