stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Sebor <se...@roguewave.com>
Subject Re: svn commit: r407397 - in /incubator/stdcxx/trunk/tests: include/rw_allocator.h src/allocator.cpp
Date Thu, 18 May 2006 15:45:39 GMT
Anton Pevtsov wrote:
> Martin,
> This code:
> 
> _RWSTD_NAMESPACE (std) {
> 
> // declare to avoid dragging in all of <memory>
> // (yes, it is undefined for programs to do that)
> template <class T>
> struct allocator;
> 
> }   // namespace std
> 
> produces a warning on MSVC: the allocator is defined as class. 
> The changing to "class allocator" eliminates the warning.
> Is this change ok?

The warning is bogus -- from a language standpoint there is no
difference between class or struct in the declaration of a class,
only in the definition of it. But I will change the class-key
from struct to class just to silence the warning. Thanks for
pointing it out!

Martin

Mime
View raw message