This is the mail archive of the gcc-bugs@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]

[Bug c++/17057] New: problems disambiguating std::allocator::rebind


The attached pre-process file will not compile on linux with today's gcc.

gcc version 3.5.0 20040816 (experimental)

However, EDG FE's don't have a problem with it. Indeed, it looks right to me,
but perhaps I miss something.

I get:

In file included from
/mnt/hd/bld/gcc/i686-pc-linux-gnu/libstdc++-v3/include/i686-pc-linux-gnu/bits/c++allocator.h:35,
                 from
/mnt/hd/bld/gcc/i686-pc-linux-gnu/libstdc++-v3/include/bits/allocator.h:53,
                 from
/mnt/hd/bld/gcc/i686-pc-linux-gnu/libstdc++-v3/include/memory:56,
                 from ext/mt_allocator.cc:3:
/mnt/hd/bld/gcc/i686-pc-linux-gnu/libstdc++-v3/include/ext/mt_allocator.h:277:
error: non-template `_M_rebind' used as template
/mnt/hd/bld/gcc/i686-pc-linux-gnu/libstdc++-v3/include/ext/mt_allocator.h:277:
note: use `_PoolTp1::template _M_rebind' to indicate that it is a template
/mnt/hd/bld/gcc/i686-pc-linux-gnu/libstdc++-v3/include/ext/mt_allocator.h:277:
error: type `_PoolTp1' is not derived from type `__gnu_cxx::__mt_alloc<_Tp,
_PoolTp>::rebind<_Tp1, _PoolTp1>'
/mnt/hd/bld/gcc/i686-pc-linux-gnu/libstdc++-v3/include/ext/mt_allocator.h:278:
error: `rebind_type' was not declared in this scope
/mnt/hd/bld/gcc/i686-pc-linux-gnu/libstdc++-v3/include/ext/mt_allocator.h:278:
error: template argument 2 is invalid
ext/mt_allocator.cc: In function `void test04()':
ext/mt_allocator.cc:180: error: non-template `rebind' used as template
ext/mt_allocator.cc:180: note: use `test04()::allocator_type::template rebind'
to indicate that it is a template
ext/mt_allocator.cc:180: error: too few template-parameter-lists
ext/mt_allocator.cc:182: error: `rebind_type' was not declared in this scope
ext/mt_allocator.cc:182: error: expected `;' before "a2"
ext/mt_allocator.cc:183: error: `a2' was not declared in this scope
ext/mt_allocator.cc:185: error: `rebind_type' is not a class or namespace
ext/mt_allocator.cc:196: error: `rebind_type' is not a class or namespace
ext/mt_allocator.cc:196: error: `pointer' does not name a type
ext/mt_allocator.cc:204: error: `p2' was not declared in this scope


The suggestion that g++ throws out there turns out to not be helpful.

-benjamin

-- 
           Summary: problems disambiguating std::allocator::rebind
           Product: gcc
           Version: 3.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: bkoz at gcc dot gnu dot org
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17057


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