Prototype matching bug

Rick Lerner rick@aai.com
Tue Mar 3 07:19:00 GMT 1998


Thanks.  I forgot about the possibility of a specialization of Base that
defined value_type differently.

In case you are interested, this questionable construct was used in a
version of SGI STL that my project was using.  The version of STL that
comes with egcs adds a definition of value_type in Derived (rb_tree), so
the issue does not arise.

Thanks again.
  Rick


At 06:41 PM 3/2/98 -0300, you wrote:
>Rick Lerner writes:
>
>> EGCS v1.0.1 generates the following error for the code below:
>
>The error message is correct.  Even if you had declared method insert
>as follows, which is required by the C++ Standard, because names from
>template-parameter-dependent base classes are not found in name
>lookup, this would still be invalid, because it is impossible to prove 
>that, for every instantiation of Base<Value>, Base<Value>::value_type
>is a synonym of Value.
>
>>   void insert(typename Base<Value>::value_type& v);
>
>-- 
>Alexandre Oliva
> mailto:oliva@dcc.unicamp.br mailto:aoliva@acm.org
> http://www.dcc.unicamp.br/~oliva
>Universidade Estadual de Campinas, SP, Brasil
>
>



More information about the Gcc-bugs mailing list