location
location
: location (const position&
begin, const position&
end)
¶Create a Location
from the endpoints of the range.
location
: location (const position&
pos = position())
¶location
: location (filename_type*
file, counter_type
line, counter_type
col)
¶Create a Location
denoting an empty range located at a given point.
location
: void
initialize (filename_type*
file = nullptr, counter_type
line = 1, counter_type
col = 1)
¶Reset the location to an empty range at the given values.
location
: position
begin ¶location
: position
end ¶The first, inclusive, position of the range, and the first beyond.
location
: void
columns (counter_type
width = 1)
¶location
: void
lines (counter_type
height = 1)
¶Forwarded to the end
position.
location
: location
operator+ (counter_type
width)
¶location
: location
operator+= (counter_type
width)
¶location
: location
operator- (counter_type
width)
¶location
: location
operator-= (counter_type
width)
¶Various forms of syntactic sugar for columns
.
location
: location
operator+ (const location&
end)
¶location
: location
operator+= (const location&
end)
¶Join two locations: starts at the position of the first one, and ends at the position of the second.
location
: void
step ()
¶Move begin
onto end
.
location
: bool
operator== (const location&
that)
¶location
: bool
operator!= (const location&
that)
¶Whether *this
and that
denote equal/different ranges of
positions.
std::ostream&
operator<< (std::ostream&
o, const location&
p)
¶Report p on o, taking care of special cases such as: no
filename
defined, or equal filename/line or column.