potential identifier collision in locale_facets.h

Gabriel Dos Reis Gabriel.Dos-Reis@cmla.ens-cachan.fr
Sat Apr 1 00:00:00 GMT 2000


scott snyder <snyder@fnal.gov> writes:

| hi -
| 
| I ran into a problem with the locale headers the other day.
| Just including <locale> works fine, but for this input:
| 
| ------------------------------
| int mask();
| #include <locale>
| ------------------------------
| 
| i get a slew of errors, starting with
| 
| In file included from inst/include/g++-v3/bits/std_locale.h:38,
|                  from inst/include/g++-v3/locale:2,
|                  from x.cc:2:
| inst/include/g++-v3/bits/locale_facets.h:169: parse error before `,'
| inst/include/g++-v3/bits/locale_facets.h:173: type specifier omitted for parameter
| 
| Note that i build with the std:: namespace enabled and with a current
| cvs version of g++ (20000306); that may make a difference here.
| 
| Line 169 of locale_facets.h is
| 
|       is(mask __m, char_type __c) const
| 
| so we're picking up the wrong declaration of `mask' here.

You're right.  Template base classes are never examinated during
first-phase name-lookup.


-- Gaby


More information about the Libstdc++ mailing list