This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[v3] Core Issue 224


Hello,

The resolution for Core Issue 224 says that, within the scope of a template
class (say, A<T>), the names k, A::k, and A<T>::k are perfect synonyms. They
both cause a non-dependent lookup of "k" at the point of definition. Before,
"A::k" was thought to be a dependent name, it required the keyword "typename"
in front of it, and it allowed "k" to be looked up at the point of instantation
(and, for instance, in dependent bases).

I have a work in progress patch to implement the resolution in the C++
frontend, and the following patch looks like it's the only thing needed to make
v3 code compliant. I'd like to have this applied to mainline before my patch
goes in.

I tested this with make clean-target-libstdc++-v3, make
all-target-libstdc++-v3, make test-target-libstdc++-v3. I don't know which is
the official way to test a v3 patch (maybe it should be documented on the
website).

OK for mainline?

Giovanni Bajo



2004-01-09  Giovanni Bajo  <giovannibajo@gcc.gnu.org>

        * include/bits/locale_facets.h: Make a name really dependent. This
        will be needed when Core Issue 224 is implemented.


Index: locale_facets.h
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/include/bits/locale_facets.h,v
retrieving revision 1.82
diff -c -3 -p -r1.82 locale_facets.h
*** locale_facets.h     7 Jan 2004 05:22:37 -0000       1.82
--- locale_facets.h     9 Jan 2004 15:56:52 -0000
*************** namespace std
*** 621,627 ****
      public:
        // Types:
        typedef _CharT                  char_type;
!       typedef typename ctype::mask    mask;

        /// The facet id for ctype<char_type>
        static locale::id               id;
--- 621,627 ----
      public:
        // Types:
        typedef _CharT                  char_type;
!       typedef typename __ctype_abstract_base<_CharT>::mask mask;

        /// The facet id for ctype<char_type>
        static locale::id               id;



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]