1 /* { dg-options "-O2 -fgraphite-identity" } */
7 Point( int l = -1, int c = 0 ) throw() : line( l ), col( c ) {}
8 bool operator==( const Point & p ) const throw()
9 { return ( line == p.line && col == p.col ); }
10 bool operator<( const Point & p ) const throw()
11 { return ( line < p.line || ( line == p.line && col < p.col ) ); }
17 int characters( const int line ) const throw();
18 int pgetc( Point & p ) const throw();
19 Point eof() const throw() { return Point( 0, 0 ); }
20 bool pisvalid( const Point & p ) const throw()
21 { return ( ( p.col >= 0 && p.col < characters( p.line ) ) || p == eof() );
23 bool save( Point p1 = Point(), Point p2 = Point() ) const;
26 bool Buffer::save( Point p1, Point p2 ) const
28 if( !this->pisvalid( p1 ) ) p1 = eof();
29 if( !this->pisvalid( p2 ) ) p2 = eof();
30 for( Point p = p1; p < p2; ) { pgetc( p ); }