|
Boost : |
From: Aleksey Gurtovoy (agurtovoy_at_[hidden])
Date: 2002-12-01 16:36:54
Beman Dawes wrote:
> Hum... I'll take your word for it, but to tell the truth I
> have trouble understanding what either ``this->member_name''
> or `BaseClass::member_name'' adds.
It makes 'member_name' identifier a dependent name (14.6.2, [temp.dep]),
thus deferring its resolution to the point of instantiation.
> And the format library case
> wasn't a member name at all, it was an enum name, IIRC.
Looking at the errors that triggered the discussion, they don't seem to be
related to two-phase name lookup at all:
namespace boost {
namespace io {
enum format_error_bits { bad_format_string_bit = 1,
too_few_args_bit = 2, too_many_args_bit = 4,
out_of_range_bit = 8,
all_error_bits = 255, no_error_bits=0 };
} // namespace io
// ...
template< class Ch, class Tr>
basic_format<Ch,Tr>& basic_format<Ch,Tr> ::clear_bind(int argN)
// cancel the binding of ONE argument, and clear()
{
// ....
if( exceptions() & out_of_range_bit )
^^^^^^^^^^^^^^^^
....
} // namespace boost
'out_of_range_bit' is defined in the namespace 'io', and there is no way it
can be found through a plain 'out_of_range_bit' (not
'io::out_of_range_bit'), two-phase name lookup or not :).
Aleksey
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk