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] problems disambiguating std::allocator::rebind


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-08-17 16:32 -------
I should note my previous analysis comes after fixing the what I thought was a simple typos but what 
you complaining about as ICC 8.0 rejects the code in strict mode (-Xc -ansi):

Note that turning on strict mode (-Xc -ansi), ICC 8.0 rejects the code:
/mnt/hd/bld/gcc/i686-pc-linux-gnu/libstdc++-v3/include/ext/mt_allocator.h(278): error: name 
followed by "::" must be a class or namespace name
     typedef _PoolTp1::_M_rebind<_Tp1>::other pool_type;
                       ^

compilation aborted for pr17057.ii (code 2)

After adding the template, ICC 8.0 still rejects it:
/mnt/hd/bld/gcc/i686-pc-linux-gnu/libstdc++-v3/include/ext/mt_allocator.h(278): error: nontype 
"_PoolTp1::_M_rebind<_Tp1>::other" is not a type name
     typedef _PoolTp1::template _M_rebind<_Tp1>::other pool_type;
             ^

compilation aborted for pr17057.ii (code 2)

and adding the typename fixes the problem which is the same code which you came up with to fix for 
GCC so it looks again you did not turn on strict mode in EDG or ICC.

-- 


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]